File tree Expand file tree Collapse file tree 5 files changed +25
-8
lines changed Expand file tree Collapse file tree 5 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 4
4
"description" : " Load vue components in node." ,
5
5
"main" : " ./lib/hook.js" ,
6
6
"scripts" : {
7
- "test" : " node test/index.test"
7
+ "lint" : " eslint test/helpers/setup.js" ,
8
+ "test" : " ava" ,
9
+ "test:watch" : " ava --watch" ,
10
+ "posttest" : " npm run lint"
11
+ },
12
+ "ava" : {
13
+ "require" : [
14
+ " ./test/helpers/setup.js"
15
+ ]
8
16
},
9
17
"engines" : {
10
18
"node" : " >=6.0.0"
23
31
"webpack" : " ^2.2.1"
24
32
},
25
33
"devDependencies" : {
34
+ "ava" : " ^0.18.1" ,
35
+ "browser-env" : " ^2.0.20" ,
26
36
"css-loader" : " ^0.26.1" ,
27
37
"eslint" : " ^3.15.0" ,
28
38
"eslint-config-airbnb-base" : " ^11.1.0" ,
Original file line number Diff line number Diff line change
1
+ settings :
2
+ import/no-extraneous-dependencies : ["error", {"devDependencies": ["**/test/**"]}]
Original file line number Diff line number Diff line change
1
+ const browserEnv = require ( 'browser-env' ) ;
2
+ const { join } = require ( 'path' ) ;
3
+ const hook = require ( '../../' ) ;
4
+
5
+ browserEnv ( ) ;
6
+ hook ( join ( __dirname , 'webpack.config.test.js' ) ) ;
File renamed without changes.
Original file line number Diff line number Diff line change 1
- const { join } = require ( 'path' ) ;
2
- const hook = require ( '../lib/hook' ) ;
1
+ import _ from 'lodash' ;
2
+ import test from 'ava' ;
3
+ import TestComponent from './test.vue' ;
3
4
4
- hook ( join ( __dirname , 'webpack.config.test.js' ) ) ;
5
-
6
- const Test = require ( './test.vue' ) ;
7
-
8
- console . log ( Test . _scopeId ) ; // eslint-disable-line
5
+ test ( 'it works!' , ( t ) => {
6
+ t . true ( _ . isString ( TestComponent . _scopeId ) ) ; // eslint-disable-line no-underscore-dangle
7
+ } ) ;
You can’t perform that action at this time.
0 commit comments