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 a933a75 commit ba13d84Copy full SHA for ba13d84
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
@@ -470,10 +469,7 @@ class Suite extends Test {
470
469
this.parent.activeSubtests++;
471
this.startTime = hrtime();
472
const subtests = this.skipped ? [] : this.subtests;
473
- await ArrayPrototypeReduce(subtests, async (prev, subtest) => {
474
- await prev;
475
- await subtest.run();
476
- }, PromiseResolve());
+ await SafePromiseAll(subtests, (subtests) => subtests.start());
477
this.pass();
478
this.postRun();
479
}
0 commit comments