@@ -138,6 +138,30 @@ test('allow specifying a lib in tsconfig.json', async t => {
138
138
verify ( t , diagnostics , [ ] ) ;
139
139
} ) ;
140
140
141
+ test ( 'use moduleResolution `nodenext` when module is `nodenext` in tsconfig.json' , async t => {
142
+ const diagnostics = await tsd ( { cwd : path . join ( __dirname , 'fixtures/module-resolution/nodenext-from-tsconfig-json' ) } ) ;
143
+
144
+ verify ( t , diagnostics , [ ] ) ;
145
+ } ) ;
146
+
147
+ test ( 'use moduleResolution `nodenext` when module is `nodenext` in package.json' , async t => {
148
+ const diagnostics = await tsd ( { cwd : path . join ( __dirname , 'fixtures/module-resolution/nodenext-from-package-json' ) } ) ;
149
+
150
+ verify ( t , diagnostics , [ ] ) ;
151
+ } ) ;
152
+
153
+ test ( 'use moduleResolution `node16` when module is `node16` in tsconfig.json' , async t => {
154
+ const diagnostics = await tsd ( { cwd : path . join ( __dirname , 'fixtures/module-resolution/node16-from-tsconfig-json' ) } ) ;
155
+
156
+ verify ( t , diagnostics , [ ] ) ;
157
+ } ) ;
158
+
159
+ test ( 'use moduleResolution `node16` when module is `node16` in package.json' , async t => {
160
+ const diagnostics = await tsd ( { cwd : path . join ( __dirname , 'fixtures/module-resolution/node16-from-package-json' ) } ) ;
161
+
162
+ verify ( t , diagnostics , [ ] ) ;
163
+ } ) ;
164
+
141
165
test ( 'add support for esm with esModuleInterop' , async t => {
142
166
const diagnostics = await tsd ( {
143
167
cwd : path . join ( __dirname , 'fixtures/esm' )
0 commit comments