File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ module.exports = {
44
44
'js' : 'never' ,
45
45
'vue' : 'never'
46
46
} ] ,
47
+ // allow optionalDependencies
48
+ 'import/no-extraneous-dependencies' : [ 'error' , {
49
+ 'optionalDependencies' : [ 'test/unit/index.js' ]
50
+ } ] ,
47
51
{ { / if_eq} }
48
52
// allow debugger during development
49
53
'no-debugger' : process . env . NODE_ENV === 'production' ? 2 : 0
Original file line number Diff line number Diff line change @@ -3,10 +3,8 @@ import Hello from 'src/components/Hello'{{#if_eq lintConfig "airbnb"}};{{/if_eq}
3
3
4
4
describe ( 'Hello.vue' , ( ) => {
5
5
it ( 'should render correct contents' , ( ) => {
6
- const vm = new Vue ( {
7
- el : document . createElement ( 'div' ) ,
8
- render : ( h ) => h ( Hello ) { { #if_eq lintConfig "airbnb" } } , { { / if_eq} }
9
- } ) { { #if_eq lintConfig "airbnb" } } ; { { / i f _ e q } }
6
+ const Constructor = Vue . extend ( Hello ) { { #if_eq lintConfig "airbnb" } } ; { { / i f _ e q } }
7
+ const vm = new Constructor ( ) . $mount ( ) { { #if_eq lintConfig "airbnb" } } ; { { / i f _ e q } }
10
8
expect ( vm . $el . querySelector ( '.hello h1' ) . textContent )
11
9
. to . equal ( 'Welcome to Your Vue.js App' ) { { #if_eq lintConfig "airbnb" } } ; { { / i f _ e q } }
12
10
} ) { { #if_eq lintConfig "airbnb" } } ; { { / i f _ e q } }
You can’t perform that action at this time.
0 commit comments