@@ -805,28 +805,26 @@ describe('ts-node', function () {
805
805
} )
806
806
} )
807
807
808
- describe ( 'support a transpile only mode' , ( ) => {
809
- it ( 'should execute successfully with type errors and transpile-only enabled' , ( done ) => {
810
- exec ( `${ cmd } /transpile-only index.ts` , { cwd : join ( __dirname , '../tests/esm-transpile-only' ) } , function ( err , stdout ) {
811
- expect ( err ) . to . equal ( null )
812
- expect ( stdout ) . to . equal ( 'foo bar baz biff\n' )
808
+ it ( 'should support transpile only mode via dedicated loader entrypoint' , ( done ) => {
809
+ exec ( `${ cmd } /transpile-only index.ts` , { cwd : join ( __dirname , '../tests/esm-transpile-only' ) } , function ( err , stdout ) {
810
+ expect ( err ) . to . equal ( null )
811
+ expect ( stdout ) . to . equal ( '' )
813
812
814
- return done ( )
815
- } )
813
+ return done ( )
816
814
} )
817
- it ( 'should throw an error with type errors and transpile-only disabled' , ( done ) => {
818
- exec ( `${ cmd } index.ts` , { cwd : join ( __dirname , '../tests/esm-transpile-only' ) } , function ( err , stdout ) {
819
- if ( err === null ) {
820
- return done ( 'Command was expected to fail, but it succeeded.' )
821
- }
815
+ } )
816
+ it ( 'should throw type errors without transpile-only enabled' , ( done ) => {
817
+ exec ( `${ cmd } index.ts` , { cwd : join ( __dirname , '../tests/esm-transpile-only' ) } , function ( err , stdout ) {
818
+ if ( err === null ) {
819
+ return done ( 'Command was expected to fail, but it succeeded.' )
820
+ }
822
821
823
- expect ( err . message ) . to . contain ( 'Unable to compile TypeScript' )
824
- expect ( err . message ) . to . match ( new RegExp ( 'TS2345: Argument of type \'(?:number|1101)\' is not assignable to parameter of type \'string\'\\.' ) )
825
- expect ( err . message ) . to . match ( new RegExp ( 'TS2322: Type \'(?:"hello world"|string)\' is not assignable to type \'number\'\\.' ) )
826
- expect ( stdout ) . to . equal ( '' )
822
+ expect ( err . message ) . to . contain ( 'Unable to compile TypeScript' )
823
+ expect ( err . message ) . to . match ( new RegExp ( 'TS2345: Argument of type \'(?:number|1101)\' is not assignable to parameter of type \'string\'\\.' ) )
824
+ expect ( err . message ) . to . match ( new RegExp ( 'TS2322: Type \'(?:"hello world"|string)\' is not assignable to type \'number\'\\.' ) )
825
+ expect ( stdout ) . to . equal ( '' )
827
826
828
- return done ( )
829
- } )
827
+ return done ( )
830
828
} )
831
829
} )
832
830
}
0 commit comments