Skip to content

Commit 238a705

Browse files
committed
test_runner: fix it concurrency
1 parent 7cc1917 commit 238a705

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/internal/test_runner/test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
'use strict';
22
const {
33
ArrayPrototypePush,
4-
ArrayPrototypeReduce,
54
ArrayPrototypeShift,
65
ArrayPrototypeUnshift,
76
FunctionPrototype,
87
Number,
9-
PromiseResolve,
8+
PromiseAll,
109
ReflectApply,
1110
SafeMap,
1211
} = primordials;
@@ -470,10 +469,7 @@ class Suite extends Test {
470469
this.parent.activeSubtests++;
471470
this.startTime = hrtime();
472471
const subtests = this.skipped ? [] : this.subtests;
473-
await ArrayPrototypeReduce(subtests, async (prev, subtest) => {
474-
await prev;
475-
await subtest.run();
476-
}, PromiseResolve());
472+
await PromiseAll(ArrayPrototypeMap(subtests, (subtests) => subtests.start()));
477473
this.pass();
478474
this.postRun();
479475
}

0 commit comments

Comments
 (0)