File tree 1 file changed +4
-6
lines changed
packages/@vue/cli-plugin-eslint/__tests__ 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -135,19 +135,19 @@ test('typescript', async () => {
135
135
} )
136
136
137
137
test ( 'lint on save' , async ( ) => {
138
- const { pkg } = await generateWithPlugin ( {
138
+ const { files } = await generateWithPlugin ( {
139
139
id : 'eslint' ,
140
140
apply : require ( '../generator' ) ,
141
141
options : {
142
142
lintOn : 'save'
143
143
}
144
144
} )
145
145
// lintOnSave defaults to true so no need for the vue config
146
- expect ( pkg . vue ) . toBeFalsy ( )
146
+ expect ( files [ ' vue.config.js' ] ) . toBeUndefined ( )
147
147
} )
148
148
149
149
test ( 'lint on commit' , async ( ) => {
150
- const { pkg } = await generateWithPlugin ( {
150
+ const { pkg, files } = await generateWithPlugin ( {
151
151
id : 'eslint' ,
152
152
apply : require ( '../generator' ) ,
153
153
options : {
@@ -159,9 +159,7 @@ test('lint on commit', async () => {
159
159
expect ( pkg [ 'lint-staged' ] ) . toEqual ( {
160
160
'*.{js,jsx,vue}' : 'vue-cli-service lint'
161
161
} )
162
- expect ( pkg . vue ) . toEqual ( {
163
- lintOnSave : false
164
- } )
162
+ expect ( files [ 'vue.config.js' ] ) . toMatch ( 'lintOnSave: false' )
165
163
} )
166
164
167
165
test ( 'should lint ts files when typescript plugin co-exists' , async ( ) => {
You can’t perform that action at this time.
0 commit comments