File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
tests/specs/parse-tsconfig Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,6 @@ const normalizeCompilerOptions = (
291291
292292 if ( target === 'esnext' ) {
293293 compilerOptions . module ??= 'es6' ;
294- compilerOptions . moduleResolution ??= 'classic' ;
295294 compilerOptions . useDefineForClassFields ??= true ;
296295 }
297296
@@ -308,7 +307,6 @@ const normalizeCompilerOptions = (
308307 || target === 'es2024'
309308 ) {
310309 compilerOptions . module ??= 'es6' ;
311- compilerOptions . moduleResolution ??= 'classic' ;
312310 }
313311
314312 if (
Original file line number Diff line number Diff line change @@ -93,6 +93,24 @@ export default testSuite(({ describe }) => {
9393 expect ( expectedTsconfig ) . toStrictEqual ( parsedTsconfig ) ;
9494 } ) ;
9595
96+ test ( 'implicit config' , async ( ) => {
97+ await using fixture = await createFixture ( {
98+ 'file.ts' : '' ,
99+ 'tsconfig.json' : createTsconfigJson ( {
100+ compilerOptions : {
101+ target : 'es2022' ,
102+ module : 'preserve' ,
103+ } ,
104+ } ) ,
105+ } ) ;
106+
107+ const parsedTsconfig = parseTsconfig ( fixture . getPath ( 'tsconfig.json' ) ) ;
108+ const expectedTsconfig = await getTscTsconfig ( fixture . path ) ;
109+ delete expectedTsconfig . files ;
110+
111+ expect ( expectedTsconfig ) . toStrictEqual ( parsedTsconfig ) ;
112+ } ) ;
113+
96114 describe ( 'baseUrl' , ( { test } ) => {
97115 test ( 'relative path' , async ( ) => {
98116 await using fixture = await createFixture ( {
You can’t perform that action at this time.
0 commit comments