File tree 3 files changed +13
-9
lines changed
3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -178,13 +178,14 @@ function getGlobalRoot() {
178
178
globalRoot . reporter . once ( 'test:fail' , ( ) => {
179
179
process . exitCode = kGenericUserError ;
180
180
} ) ;
181
- reportersSetup = setupTestReporters ( globalRoot . reporter ) ;
181
+ reportersSetup = setupTestReporters ( globalRoot ) ;
182
182
}
183
183
return globalRoot ;
184
184
}
185
185
186
186
async function startSubtest ( subtest ) {
187
187
await reportersSetup ;
188
+ getGlobalRoot ( ) . harness . bootstrapComplete = true ;
188
189
await subtest . start ( ) ;
189
190
}
190
191
Original file line number Diff line number Diff line change @@ -387,13 +387,16 @@ function run(options) {
387
387
filesWatcher = watchFiles ( testFiles , root , inspectPort ) ;
388
388
postRun = undefined ;
389
389
}
390
- const runFiles = ( ) => SafePromiseAllSettledReturnVoid ( testFiles , ( path ) => {
391
- const subtest = runTestFile ( path , root , inspectPort , filesWatcher ) ;
392
- runningSubtests . set ( path , subtest ) ;
393
- return subtest ;
394
- } ) ;
390
+ const runFiles = ( ) => {
391
+ root . harness . bootstrapComplete = true ;
392
+ return SafePromiseAllSettledReturnVoid ( testFiles , ( path ) => {
393
+ const subtest = runTestFile ( path , root , inspectPort , filesWatcher ) ;
394
+ runningSubtests . set ( path , subtest ) ;
395
+ return subtest ;
396
+ } ) ;
397
+ } ;
395
398
396
- PromisePrototypeThen ( PromisePrototypeThen ( PromiseResolve ( setup ?. ( root . reporter ) ) , runFiles ) , postRun ) ;
399
+ PromisePrototypeThen ( PromisePrototypeThen ( PromiseResolve ( setup ?. ( root ) ) , runFiles ) , postRun ) ;
397
400
398
401
return root . reporter ;
399
402
}
Original file line number Diff line number Diff line change @@ -150,13 +150,13 @@ async function getReportersMap(reporters, destinations) {
150
150
}
151
151
152
152
153
- async function setupTestReporters ( testsStream ) {
153
+ async function setupTestReporters ( rootTest ) {
154
154
try {
155
155
const { reporters, destinations } = parseCommandLine ( ) ;
156
156
const reportersMap = await getReportersMap ( reporters , destinations ) ;
157
157
for ( let i = 0 ; i < reportersMap . length ; i ++ ) {
158
158
const { reporter, destination } = reportersMap [ i ] ;
159
- compose ( testsStream , reporter ) . pipe ( destination ) ;
159
+ compose ( rootTest . reporter , reporter ) . pipe ( destination ) ;
160
160
}
161
161
} catch ( err ) {
162
162
throw new ERR_TEST_FAILURE ( err , kAsyncBootstrapFailure ) ;
You can’t perform that action at this time.
0 commit comments