@@ -354,6 +354,34 @@ test('execute a TypeScript test mocking module', { skip: isWindows && process.ar
354354 strictEqual ( result . code , 0 ) ;
355355} ) ;
356356
357+ test ( 'expect process.features.typescript to be \'strip\' when --experimental-strip-types' , async ( ) => {
358+ const result = await spawnPromisified ( process . execPath , [
359+ '--no-warnings' ,
360+ '--experimental-strip-types' ,
361+ '-p' , 'process.features.typescript' ,
362+ ] ) ;
363+
364+ strictEqual ( result . stderr , '' ) ;
365+ strictEqual ( result . stdout , 'strip\n' ) ;
366+ strictEqual ( result . code , 0 ) ;
367+ } ) ;
368+
369+ test ( 'expect process.features.typescript to be \'transform\' when --experimental-transform-types' , async ( ) => {
370+ const result = await spawnPromisified ( process . execPath , [
371+ '--no-warnings' ,
372+ '--experimental-transform-types' ,
373+ '-p' , 'process.features.typescript' ,
374+ ] ) ;
375+
376+ strictEqual ( result . stderr , '' ) ;
377+ strictEqual ( result . stdout , 'transform\n' ) ;
378+ strictEqual ( result . code , 0 ) ;
379+ } ) ;
380+
381+ test ( 'expect process.features.typescript to be false without type-stripping' , async ( ) => {
382+ strictEqual ( process . features . typescript , false ) ;
383+ } ) ;
384+
357385test ( 'execute a TypeScript file with union types' , async ( ) => {
358386 const result = await spawnPromisified ( process . execPath , [
359387 '--experimental-strip-types' ,
0 commit comments