@@ -368,7 +368,7 @@ test('plugin > ts > eslint-plugin-eslint-comments no-duplicate-disable', async t
368368
369369test ( 'lint-text can be ran multiple times in a row with top level typescript rules' , async t => {
370370 const { cwd} = t . context ;
371- const tsFilePath = path . join ( cwd , 'test.ts' ) ;
371+ const filePath = path . join ( cwd , 'test.ts' ) ;
372372 // Text should violate the @typescript -eslint/naming-convention rule
373373 const text = dedent `
374374 const fooBar = 10;
@@ -377,12 +377,11 @@ test('lint-text can be ran multiple times in a row with top level typescript rul
377377 const foo_bar = 10;\n
378378 ` ;
379379
380- const { results : resultsNoConfig } = await new Xo ( { cwd} ) . lintText (
381- text ,
382- { filePath : tsFilePath } ,
383- ) ;
380+ const { results : resultsNoConfig } = await Xo . lintText ( text , { cwd, filePath} ) ;
384381 // Ensure that with no config, the text is linted and errors are found
385- t . true ( resultsNoConfig [ 0 ] ?. errorCount === 3 ) ;
382+ // t.true(resultsNoConfig[0]?.errorCount === 3);
383+
384+ t . log ( resultsNoConfig [ 0 ] ) ;
386385
387386 await fs . writeFile (
388387 path . join ( cwd , 'xo.config.ts' ) ,
@@ -399,15 +398,20 @@ test('lint-text can be ran multiple times in a row with top level typescript rul
399398 'utf8' ,
400399 ) ;
401400
401+ t . log ( await fs . readFile ( path . join ( cwd , 'tsconfig.json' ) , 'utf8' ) ) ;
402+
402403 // Now with a config that turns off the naming-convention rule, the text should not have any errors
403404 // and should not have any messages when ran multiple times
404- const { results} = await Xo . lintText ( text , { cwd, filePath : tsFilePath , warnIgnored : false } ) ;
405+ const { results} = await Xo . lintText ( text , { cwd, filePath} ) ;
406+ t . log ( results [ 0 ] ) ;
405407 t . is ( results [ 0 ] ?. errorCount , 0 ) ;
406408 t . true ( results [ 0 ] ?. messages ?. length === 0 ) ;
407- const { results : results2 } = await Xo . lintText ( text , { cwd, filePath : tsFilePath , warnIgnored : false } ) ;
409+ const { results : results2 } = await Xo . lintText ( text , { cwd, filePath} ) ;
410+ t . log ( results2 [ 0 ] ) ;
408411 t . is ( results2 [ 0 ] ?. errorCount , 0 ) ;
409412 t . true ( results2 [ 0 ] ?. messages ?. length === 0 ) ;
410- const { results : results3 } = await Xo . lintText ( text , { cwd, filePath : tsFilePath , warnIgnored : false } ) ;
413+ const { results : results3 } = await Xo . lintText ( text , { cwd, filePath} ) ;
414+ t . log ( results3 [ 0 ] ) ;
411415 t . is ( results3 [ 0 ] ?. errorCount , 0 ) ;
412416 t . true ( results3 [ 0 ] ?. messages ?. length === 0 ) ;
413417} ) ;
0 commit comments