@@ -121,17 +121,27 @@ test('main() resolvePossibleOutOfBandCompilationSources() .js but .ts not config
121121
122122test ( 'main() resolvePossibleOutOfBandCompilationSources() .cjs and .cjs and .cts configured' , withProvider , ( t , provider ) => {
123123 const main = provider . main ( { config : { extensions : [ 'cjs' , 'cts' ] , rewritePaths : { 'src/' : 'build/' } , compile : false } } ) ;
124- t . deepEqual ( main . resolvePossibleOutOfBandCompilationSources ( path . join ( projectDirectory , 'build/foo.cjs' ) ) , [ path . join ( projectDirectory , 'src/foo.cjs' ) , path . join ( projectDirectory , 'src/foo.cts' ) ] ) ;
124+ t . deepEqual ( main . resolvePossibleOutOfBandCompilationSources ( path . join ( projectDirectory , 'build/foo.cjs' ) ) , [
125+ path . join ( projectDirectory , 'src/foo.cjs' ) ,
126+ path . join ( projectDirectory , 'src/foo.cts' ) ,
127+ ] ) ;
125128} ) ;
126129
127130test ( 'main() resolvePossibleOutOfBandCompilationSources() .mjs and .mjs and .mts configured' , withProvider , ( t , provider ) => {
128131 const main = provider . main ( { config : { extensions : [ 'mjs' , 'mts' ] , rewritePaths : { 'src/' : 'build/' } , compile : false } } ) ;
129- t . deepEqual ( main . resolvePossibleOutOfBandCompilationSources ( path . join ( projectDirectory , 'build/foo.mjs' ) ) , [ path . join ( projectDirectory , 'src/foo.mjs' ) , path . join ( projectDirectory , 'src/foo.mts' ) ] ) ;
132+ t . deepEqual ( main . resolvePossibleOutOfBandCompilationSources ( path . join ( projectDirectory , 'build/foo.mjs' ) ) , [
133+ path . join ( projectDirectory , 'src/foo.mjs' ) ,
134+ path . join ( projectDirectory , 'src/foo.mts' ) ,
135+ ] ) ;
130136} ) ;
131137
132138test ( 'main() resolvePossibleOutOfBandCompilationSources() .js and .js, .ts and .tsx configured' , withProvider , ( t , provider ) => {
133139 const main = provider . main ( { config : { extensions : [ 'js' , 'ts' , 'tsx' ] , rewritePaths : { 'src/' : 'build/' } , compile : false } } ) ;
134- t . deepEqual ( main . resolvePossibleOutOfBandCompilationSources ( path . join ( projectDirectory , 'build/foo.js' ) ) , [ path . join ( projectDirectory , 'src/foo.js' ) , path . join ( projectDirectory , 'src/foo.ts' ) , path . join ( projectDirectory , 'src/foo.tsx' ) ] ) ;
140+ t . deepEqual ( main . resolvePossibleOutOfBandCompilationSources ( path . join ( projectDirectory , 'build/foo.js' ) ) , [
141+ path . join ( projectDirectory , 'src/foo.js' ) ,
142+ path . join ( projectDirectory , 'src/foo.ts' ) ,
143+ path . join ( projectDirectory , 'src/foo.tsx' ) ,
144+ ] ) ;
135145} ) ;
136146
137147test ( 'main() resolvePossibleOutOfBandCompilationSources() returns the first possible path that exists' , withProvider , ( t , provider ) => {
0 commit comments