@@ -194,7 +194,6 @@ if (args.length === 0 || options.watch) {
194
194
abort ( "runner" , "couldn't find test folder" ) ;
195
195
}
196
196
msg ( 'bin' , 'discovered' , "./" + testFolder ) ;
197
-
198
197
if ( args . length === 0 ) {
199
198
args = paths ( testFolder ) . filter ( function ( f ) {
200
199
return new ( RegExp ) ( '(-|_)' + testFolder + '.(js|coffee)$' ) . test ( f ) ;
@@ -280,8 +279,7 @@ if (! options.watch) {
280
279
lastRun ,
281
280
colors = [ '32m' , '33m' , '31m' ] ,
282
281
timer = setInterval ( tick , 100 ) ;
283
-
284
- process . on ( 'uncaughtException' , cleanup ) ;
282
+ process . on ( 'uncaughtException' , exception ) ;
285
283
process . on ( 'exit' , cleanup ) ;
286
284
process . on ( 'SIGINT' , function ( ) {
287
285
process . exit ( 0 ) ;
@@ -321,6 +319,7 @@ if (! options.watch) {
321
319
function cursorHide ( ) { esc ( "?25l" ) }
322
320
function cursorShow ( ) { esc ( "?25h" ) }
323
321
function cleanup ( ) { eraseLine ( ) , cursorShow ( ) , clearInterval ( timer ) , print ( '\n' ) }
322
+ function exception ( err ) { print ( err . stack || err . message || JSON . stringify ( err ) ) , running = 0 }
324
323
325
324
//
326
325
// Get a matching test for a given file
0 commit comments