@@ -412,3 +412,29 @@ test('expect error when executing a TypeScript file with generics', async () =>
412412 strictEqual ( result . stdout , '' ) ;
413413 strictEqual ( result . code , 1 ) ;
414414} ) ;
415+
416+ test ( 'execute a TypeScript loader and a .ts file' , async ( ) => {
417+ const result = await spawnPromisified ( process . execPath , [
418+ '--experimental-strip-types' ,
419+ '--no-warnings' ,
420+ '--import' ,
421+ fixtures . fileURL ( 'typescript/ts/test-loader.ts' ) ,
422+ fixtures . path ( 'typescript/ts/test-typescript.ts' ) ,
423+ ] ) ;
424+ strictEqual ( result . stderr , '' ) ;
425+ match ( result . stdout , / H e l l o , T y p e S c r i p t ! / ) ;
426+ strictEqual ( result . code , 0 ) ;
427+ } ) ;
428+
429+ test ( 'execute a TypeScript loader and a .js file' , async ( ) => {
430+ const result = await spawnPromisified ( process . execPath , [
431+ '--experimental-strip-types' ,
432+ '--no-warnings' ,
433+ '--import' ,
434+ fixtures . fileURL ( 'typescript/ts/test-loader.ts' ) ,
435+ fixtures . path ( 'typescript/ts/test-simple.js' ) ,
436+ ] ) ;
437+ strictEqual ( result . stderr , '' ) ;
438+ match ( result . stdout , / H e l l o , T y p e S c r i p t ! / ) ;
439+ strictEqual ( result . code , 0 ) ;
440+ } ) ;
0 commit comments