We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
it
1 parent 3aec7da commit 8d8cfcfCopy full SHA for 8d8cfcf
1 file changed
lib/internal/test_runner/test.js
@@ -1,14 +1,13 @@
1
'use strict';
2
const {
3
ArrayPrototypePush,
4
- ArrayPrototypeReduce,
5
ArrayPrototypeShift,
6
ArrayPrototypeUnshift,
7
FunctionPrototype,
8
Number,
9
- PromiseResolve,
10
ReflectApply,
11
SafeMap,
+ SafePromiseAll,
12
} = primordials;
13
const { AsyncResource } = require('async_hooks');
14
@@ -480,10 +479,7 @@ class Suite extends Test {
480
479
this.parent.activeSubtests++;
481
this.startTime = hrtime();
482
const subtests = this.skipped || this.error ? [] : this.subtests;
483
- await ArrayPrototypeReduce(subtests, async (prev, subtest) => {
484
- await prev;
485
- await subtest.run();
486
- }, PromiseResolve());
+ await SafePromiseAll(subtests, (subtests) => subtests.start());
487
this.pass();
488
this.postRun();
489
}
0 commit comments