@@ -44,10 +44,6 @@ x.test = function (props) {
4444 return ;
4545 }
4646
47- // if (runner.stats.testCount === 1) {
48- // return;
49- // }
50-
5147 // display duration only over a threshold
5248 var threshold = 100 ;
5349 var dur = props . duration > threshold ? chalk . gray . dim ( ' (' + prettyMs ( props . duration ) + ')' ) : '' ;
@@ -76,9 +72,11 @@ x.report = function (passed, failed, unhandled, uncaught) {
7672 } else {
7773 log . writelpad ( chalk . green ( passed , plur ( 'test' , passed ) , 'passed' ) ) ;
7874 }
75+
7976 if ( unhandled > 0 ) {
8077 log . writelpad ( chalk . red ( unhandled , 'unhandled' , plur ( 'rejection' , unhandled ) ) ) ;
8178 }
79+
8280 if ( uncaught > 0 ) {
8381 log . writelpad ( chalk . red ( uncaught , 'uncaught' , plur ( 'exception' , uncaught ) ) ) ;
8482 }
@@ -88,23 +86,28 @@ x.unhandledRejections = function (file, rejections) {
8886 if ( ! ( rejections && rejections . length ) ) {
8987 return ;
9088 }
89+
9190 rejections . forEach ( function ( rejection ) {
9291 log . write ( chalk . red ( 'Unhandled Rejection: ' , file ) ) ;
92+
9393 if ( rejection . stack ) {
9494 log . writelpad ( chalk . red ( beautifyStack ( rejection . stack ) ) ) ;
9595 } else {
9696 log . writelpad ( chalk . red ( JSON . stringify ( rejection ) ) ) ;
9797 }
98+
9899 log . write ( ) ;
99100 } ) ;
100101} ;
101102
102103x . uncaughtException = function ( file , error ) {
103104 log . write ( chalk . red ( 'Uncaught Exception: ' , file ) ) ;
105+
104106 if ( error . stack ) {
105107 log . writelpad ( chalk . red ( beautifyStack ( error . stack ) ) ) ;
106108 } else {
107109 log . writelpad ( chalk . red ( JSON . stringify ( error ) ) ) ;
108110 }
111+
109112 log . write ( ) ;
110113} ;
0 commit comments