@@ -323,3 +323,29 @@ test('expect error when executing a TypeScript file with generics', async () =>
323323 strictEqual ( result . stdout , '' ) ;
324324 strictEqual ( result . code , 1 ) ;
325325} ) ;
326+
327+ test ( 'execute a TypeScript loader and a .ts file' , async ( ) => {
328+ const result = await spawnPromisified ( process . execPath , [
329+ '--experimental-strip-types' ,
330+ '--no-warnings' ,
331+ '--import' ,
332+ fixtures . fileURL ( 'typescript/ts/test-loader.ts' ) ,
333+ fixtures . path ( 'typescript/ts/test-typescript.ts' ) ,
334+ ] ) ;
335+ strictEqual ( result . stderr , '' ) ;
336+ match ( result . stdout , / H e l l o , T y p e S c r i p t ! / ) ;
337+ strictEqual ( result . code , 0 ) ;
338+ } ) ;
339+
340+ test ( 'execute a TypeScript loader and a .js file' , async ( ) => {
341+ const result = await spawnPromisified ( process . execPath , [
342+ '--experimental-strip-types' ,
343+ '--no-warnings' ,
344+ '--import' ,
345+ fixtures . fileURL ( 'typescript/ts/test-loader.ts' ) ,
346+ fixtures . path ( 'typescript/ts/test-simple.js' ) ,
347+ ] ) ;
348+ strictEqual ( result . stderr , '' ) ;
349+ match ( result . stdout , / H e l l o , T y p e S c r i p t ! / ) ;
350+ strictEqual ( result . code , 0 ) ;
351+ } ) ;
0 commit comments