@@ -18,8 +18,6 @@ test('require a .ts file with explicit extension succeeds', async () => {
1818 strictEqual ( result . code , 0 ) ;
1919} ) ;
2020
21- // TODO(marco-ippolito) This test should fail because extensionless require
22- // but it's behaving like a .js file
2321test ( 'eval require a .ts file with implicit extension fails' , async ( ) => {
2422 const result = await spawnPromisified ( process . execPath , [
2523 '--experimental-strip-types' ,
@@ -30,23 +28,21 @@ test('eval require a .ts file with implicit extension fails', async () => {
3028 cwd : fixtures . path ( 'typescript/ts' ) ,
3129 } ) ;
3230
33- strictEqual ( result . stderr , '' ) ;
34- match ( result . stdout , / H e l l o , T y p e S c r i p t ! / ) ;
35- strictEqual ( result . code , 0 ) ;
31+ strictEqual ( result . stdout , '' ) ;
32+ match ( result . stderr , / E r r o r : C a n n o t f i n d m o d u l e / ) ;
33+ strictEqual ( result . code , 1 ) ;
3634} ) ;
3735
38- // TODO(marco-ippolito) This test should fail because extensionless require
39- // but it's behaving like a .js file
4036test ( 'require a .ts file with implicit extension fails' , async ( ) => {
4137 const result = await spawnPromisified ( process . execPath , [
4238 '--experimental-strip-types' ,
4339 '--no-warnings' ,
4440 fixtures . path ( 'typescript/cts/test-extensionless-require.ts' ) ,
4541 ] ) ;
4642
47- strictEqual ( result . stderr , '' ) ;
48- match ( result . stdout , / H e l l o , T y p e S c r i p t ! / ) ;
49- strictEqual ( result . code , 0 ) ;
43+ strictEqual ( result . stdout , '' ) ;
44+ match ( result . stderr , / E r r o r : C a n n o t f i n d m o d u l e / ) ;
45+ strictEqual ( result . code , 1 ) ;
5046} ) ;
5147
5248test ( 'expect failure of an .mts file with CommonJS syntax' , async ( ) => {
0 commit comments