Commit 9033d28 1 parent 70b9af9 commit 9033d28 Copy full SHA for 9033d28
File tree 2 files changed +15
-6
lines changed
2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const {
3
3
ArrayPrototypePush,
4
- ArrayPrototypeReduce,
5
4
ArrayPrototypeShift,
6
5
ArrayPrototypeUnshift,
7
6
FunctionPrototype,
8
7
Number,
9
- PromiseResolve,
10
8
ReflectApply,
11
9
SafeMap,
12
10
PromiseRace,
11
+ SafePromiseAll,
13
12
} = primordials ;
14
13
const { AsyncResource } = require ( 'async_hooks' ) ;
15
14
const {
@@ -506,10 +505,7 @@ class Suite extends Test {
506
505
this . parent . activeSubtests ++ ;
507
506
this . startTime = hrtime ( ) ;
508
507
const subtests = this . skipped || this . error ? [ ] : this . subtests ;
509
- await testTimeout ( ArrayPrototypeReduce ( subtests , async ( prev , subtest ) => {
510
- await prev ;
511
- await subtest . run ( ) ;
512
- } , PromiseResolve ( ) ) , this . timeout ) ;
508
+ await SafePromiseAll ( subtests , ( subtests ) => subtests . start ( ) ) ;
513
509
this . pass ( ) ;
514
510
this . postRun ( ) ;
515
511
}
Original file line number Diff line number Diff line change @@ -188,6 +188,10 @@ ok 20 - immediate resolve pass
188
188
*
189
189
*
190
190
*
191
+ *
192
+ *
193
+ *
194
+ *
191
195
...
192
196
1..1
193
197
not ok 21 - subtest sync throw fail
@@ -471,6 +475,9 @@ not ok 53 - custom inspect symbol that throws fail
471
475
*
472
476
*
473
477
*
478
+ *
479
+ *
480
+ *
474
481
...
475
482
# Subtest: sync throw fails at second
476
483
not ok 2 - sync throw fails at second
@@ -486,6 +493,10 @@ not ok 53 - custom inspect symbol that throws fail
486
493
*
487
494
*
488
495
*
496
+ *
497
+ *
498
+ *
499
+ *
489
500
...
490
501
1..2
491
502
not ok 54 - subtest sync throw fails
@@ -559,6 +570,8 @@ not ok 56 - describe async throw fails
559
570
failureType: 'testTimeoutFailure'
560
571
error: 'test timed out after 5ms'
561
572
code: 'ERR_TEST_FAILURE'
573
+ stack: |-
574
+ *
562
575
...
563
576
# Subtest: timed out callback test
564
577
not ok 2 - timed out callback test
You can’t perform that action at this time.
0 commit comments