File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 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 () {
213213 } )
214214 } )
215215
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+
216228 it ( 'should pipe into `ts-node` and evaluate' , function ( done ) {
217229 const cp = exec ( BIN_EXEC , function ( err , stdout ) {
218230 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 {
442442 filterDiagnostics ( result . diagnostics , ignoreDiagnostics ) :
443443 [ ]
444444
445- if ( diagnosticList . length ) reportTSError ( configDiagnosticList )
445+ if ( diagnosticList . length ) reportTSError ( diagnosticList )
446446
447447 return [ result . outputText , result . sourceMapText as string ]
448448 }
You can’t perform that action at this time.
0 commit comments