File tree 3 files changed +14
-15
lines changed
3 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,14 @@ module.exports = function (config) {
3
3
config . set ( {
4
4
browsers : [ 'ChromeHeadless' ] ,
5
5
frameworks : [ 'browserify' , 'mocha' ] ,
6
- files : [ 'test/setup.js' , 'test/components/*/*.spec.js' ] ,
6
+ files : [
7
+ 'test/setup.js' ,
8
+ 'test/components/*/*.spec.js' ,
9
+ { pattern : 'assets/fonts/icomoon.ttf' , included : false , served : true }
10
+ ] ,
11
+ proxies : {
12
+ '/assets/' : '/base/assets/'
13
+ } ,
7
14
reporters : [ 'spec' ] ,
8
15
preprocessors : {
9
16
'test/**/*.js' : [ 'browserify' ]
Original file line number Diff line number Diff line change 5
5
"scripts" : {
6
6
"dev" : " watchify -vd -p browserify-hmr -e lib/main.js -o dist/build.js" ,
7
7
"lint" : " eslint --ext .js,.vue lib test" ,
8
- "test" : " karma start --single-run --browsers ChromeHeadless karma.conf.js " ,
8
+ "test" : " karma start" ,
9
9
"build" : " cross-env NODE_ENV=production browserify -g envify -p [ vueify/plugins/extract-css -o dist/build.css ] -e lib/main.js | uglifyjs -c warnings=false -m > dist/build.js"
10
10
},
11
11
"browserify" : {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ except according to the terms contained in the LICENSE file.
12
12
import Vue from 'vue' ;
13
13
import 'should' ;
14
14
15
- import { MockLogger , mockRoute } from './util' ;
15
+ import { MockLogger } from './util' ;
16
16
import { setHttp } from './http' ;
17
17
import '../lib/setup' ;
18
18
@@ -23,15 +23,7 @@ setHttp((...args) => {
23
23
return Promise . reject ( new Error ( ) ) ;
24
24
} ) ;
25
25
26
- // Removes a component attached to the document if there is one.
27
- const removeComponent = ( ) => $ ( 'body > script:last-of-type + *' ) . remove ( ) ;
28
-
29
- afterEach ( removeComponent ) ;
30
-
31
- // TODO. The first time a component is attached to the document, 404 errors are
32
- // returned for /assets/fonts/icomoon.ttf and icomoon.woff. I am not sure yet
33
- // why that is, but we attach a component here so that the errors are shown
34
- // before the first tests, not in the middle of the tests.
35
- mockRoute ( '/login' , { attachToDocument : true } )
36
- . then ( removeComponent )
37
- . catch ( e => console . log ( e ) ) ; // eslint-disable-line no-console
26
+ afterEach ( ( ) => {
27
+ // Remove a component attached to the document if there is one.
28
+ $ ( 'body > script:last-of-type + *' ) . remove ( )
29
+ } ) ;
You can’t perform that action at this time.
0 commit comments