@@ -93,6 +93,7 @@ class Test extends AsyncResource {
9393 this . reporter = new TapStream ( ) ;
9494 this . runOnlySubtests = this . only ;
9595 this . testNumber = 0 ;
96+ this . shouldReportSubtest = false ;
9697 } else {
9798 const indent = parent . parent === null ? parent . indent :
9899 parent . indent + parent . indentString ;
@@ -104,6 +105,7 @@ class Test extends AsyncResource {
104105 this . reporter = parent . reporter ;
105106 this . runOnlySubtests = ! this . only ;
106107 this . testNumber = parent . subtests . length + 1 ;
108+ this . shouldReportSubtest = true ;
107109 }
108110
109111 if ( isUint32 ( concurrency ) && concurrency !== 0 ) {
@@ -162,7 +164,6 @@ class Test extends AsyncResource {
162164 processReadySubtestRange ( canSend ) {
163165 const start = this . waitingOn ;
164166 const end = start + this . readySubtests . size ;
165- let shouldReportSubtest = this . parent !== null ;
166167
167168 for ( let i = start ; i < end ; i ++ ) {
168169 const subtest = this . readySubtests . get ( i ) ;
@@ -184,9 +185,9 @@ class Test extends AsyncResource {
184185 return ;
185186 }
186187
187- if ( shouldReportSubtest ) {
188+ if ( this . shouldReportSubtest ) {
188189 this . reporter . subTest ( this . indent , this . name ) ;
189- shouldReportSubtest = false ;
190+ this . shouldReportSubtest = false ;
190191 }
191192
192193 // Report the subtest's results and remove it from the ready map.
0 commit comments