@@ -121,17 +121,27 @@ test('main() resolvePossibleOutOfBandCompilationSources() .js but .ts not config
121
121
122
122
test ( 'main() resolvePossibleOutOfBandCompilationSources() .cjs and .cjs and .cts configured' , withProvider , ( t , provider ) => {
123
123
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
+ ] ) ;
125
128
} ) ;
126
129
127
130
test ( 'main() resolvePossibleOutOfBandCompilationSources() .mjs and .mjs and .mts configured' , withProvider , ( t , provider ) => {
128
131
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
+ ] ) ;
130
136
} ) ;
131
137
132
138
test ( 'main() resolvePossibleOutOfBandCompilationSources() .js and .js, .ts and .tsx configured' , withProvider , ( t , provider ) => {
133
139
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
+ ] ) ;
135
145
} ) ;
136
146
137
147
test ( 'main() resolvePossibleOutOfBandCompilationSources() returns the first possible path that exists' , withProvider , ( t , provider ) => {
0 commit comments