File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,18 @@ describe('ts-node', function () {
213
213
} )
214
214
} )
215
215
216
+ it ( 'should throw error even in transpileOnly mode' , function ( done ) {
217
+ exec ( `${ BIN_EXEC } --transpile-only -pe "console."` , function ( err ) {
218
+ if ( err === null ) {
219
+ return done ( 'Command was expected to fail, but it succeeded.' )
220
+ }
221
+
222
+ expect ( err . message ) . to . contain ( 'error TS1003: Identifier expected' )
223
+
224
+ return done ( )
225
+ } )
226
+ } )
227
+
216
228
it ( 'should pipe into `ts-node` and evaluate' , function ( done ) {
217
229
const cp = exec ( BIN_EXEC , function ( err , stdout ) {
218
230
expect ( err ) . to . equal ( null )
Original file line number Diff line number Diff line change @@ -442,7 +442,7 @@ export function create (options: CreateOptions = {}): Register {
442
442
filterDiagnostics ( result . diagnostics , ignoreDiagnostics ) :
443
443
[ ]
444
444
445
- if ( diagnosticList . length ) reportTSError ( configDiagnosticList )
445
+ if ( diagnosticList . length ) reportTSError ( diagnosticList )
446
446
447
447
return [ result . outputText , result . sourceMapText as string ]
448
448
}
You can’t perform that action at this time.
0 commit comments