@@ -603,7 +603,7 @@ test('mergeWithFileConfig: correctly resolves relative tsconfigs excluded file',
603
603
const excludedFilePath = path . resolve ( cwd , 'excluded-file.ts' ) ;
604
604
const excludeTsConfigPath = new RegExp ( `${ slash ( cwd ) } /node_modules/.cache/xo-linter/tsconfig\\..*\\.json[\\/]?$` , 'u' ) ;
605
605
const { options} = await manager . mergeWithFileConfig ( { cwd, filePath : excludedFilePath } ) ;
606
- t . regex ( options . tsConfigPath , excludeTsConfigPath ) ;
606
+ t . regex ( slash ( options . tsConfigPath ) , excludeTsConfigPath ) ;
607
607
} ) ;
608
608
609
609
test ( 'mergeWithFileConfig: correctly resolves relative tsconfigs included file' , async t => {
@@ -619,15 +619,15 @@ test('mergeWithFileConfig: uses generated tsconfig if specified parserOptions.pr
619
619
const filePath = path . resolve ( cwd , 'excluded-file.ts' ) ;
620
620
const expectedTsConfigPath = new RegExp ( `${ slash ( cwd ) } /node_modules/.cache/xo-linter/tsconfig\\..*\\.json[\\/]?$` , 'u' ) ;
621
621
const { options} = await manager . mergeWithFileConfig ( { cwd, filePath} ) ;
622
- t . regex ( options . tsConfigPath , expectedTsConfigPath ) ;
622
+ t . regex ( slash ( options . tsConfigPath ) , expectedTsConfigPath ) ;
623
623
} ) ;
624
624
625
625
test ( 'mergeWithFileConfig: uses generated tsconfig if specified parserOptions.project misses file' , async t => {
626
626
const cwd = path . resolve ( 'fixtures' , 'typescript' , 'parseroptions-project' ) ;
627
627
const filePath = path . resolve ( cwd , 'missed-by-options-file.ts' ) ;
628
628
const expectedTsConfigPath = new RegExp ( `${ slash ( cwd ) } /node_modules/.cache/xo-linter/tsconfig\\..*\\.json[\\/]?$` , 'u' ) ;
629
629
const { options} = await manager . mergeWithFileConfig ( { cwd, filePath} ) ;
630
- t . regex ( options . tsConfigPath , expectedTsConfigPath ) ;
630
+ t . regex ( slash ( options . tsConfigPath ) , expectedTsConfigPath ) ;
631
631
} ) ;
632
632
633
633
test ( 'mergeWithFileConfig: auto generated ts config extends found ts config if file is not covered' , async t => {
@@ -647,7 +647,7 @@ test('mergeWithFileConfig: used found ts config if file is covered', async t =>
647
647
const filePath = path . resolve ( cwd , 'foo.ts' ) ;
648
648
const expectedConfigPath = path . resolve ( cwd , 'tsconfig.json' ) ;
649
649
const { options} = await manager . mergeWithFileConfig ( { cwd, filePath} ) ;
650
- t . is ( slash ( options . tsConfigPath ) , expectedConfigPath ) ;
650
+ t . is ( options . tsConfigPath , expectedConfigPath ) ;
651
651
} ) ;
652
652
653
653
test ( 'mergeWithFileConfig: auto generated ts config extends found ts config if file is explicitly excluded' , async t => {
0 commit comments