@@ -227,8 +227,8 @@ test('should persist cache', async () => {
227227 expect ( has ( 'node_modules/.cache/eslint/cache.json' ) ) . toBe ( true )
228228} )
229229
230- test . skip ( `should use formatter 'codeframe '` , async ( ) => {
231- const project = await create ( 'eslint-formatter-codeframe ' , {
230+ test ( `should use formatter 'stylish '` , async ( ) => {
231+ const project = await create ( 'eslint-formatter-stylish ' , {
232232 plugins : {
233233 '@vue/cli-plugin-babel' : { } ,
234234 '@vue/cli-plugin-eslint' : {
@@ -259,9 +259,13 @@ test.skip(`should use formatter 'codeframe'`, async () => {
259259 isFirstMsg = false
260260 } else if ( data . match ( / s e m i / ) ) {
261261 // check the format of output
262- // https://eslint.org/docs/user-guide/formatters/#codeframe
262+ // https://eslint.org/docs/user-guide/formatters/#stylish
263+ // it looks like:
264+ // ERROR in .../packages/test/eslint-formatter-stylish/src/main.js
265+ // 1:22 error Missing semicolon semi
266+ expect ( data ) . toMatch ( `src${ path . sep } main.js` )
263267 expect ( data ) . toMatch ( `error` )
264- expect ( data ) . toMatch ( `Missing semicolon (semi) at src ${ path . sep } main.js ` )
268+ expect ( data ) . toMatch ( `Missing semicolon semi ` )
265269
266270 server . stdin . write ( 'close' )
267271 done ( )
@@ -282,7 +286,7 @@ test(`should work with eslint v8`, async () => {
282286 }
283287 } )
284288 const { read, write, run } = project
285- await run ( 'npm add -D eslint@^8.0.0-0 eslint-formatter-codeframe ' )
289+ await run ( 'npm add -D eslint@^8.0.0-0' )
286290 // should've applied airbnb autofix
287291 const main = await read ( 'src/main.js' )
288292 expect ( main ) . toMatch ( ';' )
0 commit comments