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