This repository was archived by the owner on Oct 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ var createReporter = function createReporter() {
9191 var compared = ( 0 , _diff . diffJson ) ( diag . actual , diag . expected ) . map ( writeDiff ) . join ( '' ) ;
9292
9393 println ( compared , 4 ) ;
94+ } else if ( diag . expected === 'undefined' && diag . actual === 'undefined' ) {
95+ ;
9496 } else if ( typeof diag . expected === 'string' ) {
9597 var compared = ( 0 , _diff . diffWords ) ( diag . actual , diag . expected ) . map ( writeDiff ) . join ( '' ) ;
9698
@@ -110,7 +112,7 @@ var createReporter = function createReporter() {
110112 if ( result . ok ) {
111113 println ( _chalk2 [ 'default' ] . green ( 'All of ' + result . count + ' tests passed!' ) ) ;
112114 } else {
113- println ( _chalk2 [ 'default' ] . red ( result . fail + ' of ' + result . count + ' tests failed.' ) ) ;
115+ println ( _chalk2 [ 'default' ] . red ( ( result . fail || 0 ) + ' of ' + result . count + ' tests failed.' ) ) ;
114116 stream . isFailed = true ;
115117 }
116118
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ const createReporter = () => {
6060 . join ( '' ) ;
6161
6262 println ( compared , 4 ) ;
63+ } else if ( diag . expected === 'undefined' && diag . actual === 'undefined' ) {
64+ ;
6365 } else if ( typeof diag . expected === 'string' ) {
6466 const compared = diffWords ( diag . actual , diag . expected )
6567 . map ( writeDiff )
@@ -89,7 +91,7 @@ const createReporter = () => {
8991 if ( result . ok ) {
9092 println ( chalk . green ( `All of ${ result . count } tests passed!` ) ) ;
9193 } else {
92- println ( chalk . red ( `${ result . fail } of ${ result . count } tests failed.` ) ) ;
94+ println ( chalk . red ( `${ result . fail || 0 } of ${ result . count } tests failed.` ) ) ;
9395 stream . isFailed = true ;
9496 }
9597
You can’t perform that action at this time.
0 commit comments