File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- // https://github.com/nodejs/node/blob/659dc126932f986fc33c7f1c878cb2b57a1e2fac /lib/internal/test_runner/test.js
1
+ // https://github.com/nodejs/node/blob/5ec2d7bc5deed26ac640feff279800e39dacc9c0 /lib/internal/test_runner/test.js
2
2
3
3
'use strict'
4
4
@@ -525,6 +525,7 @@ class Test extends AsyncResource {
525
525
526
526
// The test has run, so recursively cancel any outstanding subtests and
527
527
// mark this test as failed if any subtests failed.
528
+ this . pendingSubtests = [ ]
528
529
for ( let i = 0 ; i < this . subtests . length ; i ++ ) {
529
530
const subtest = this . subtests [ i ]
530
531
Original file line number Diff line number Diff line change 1
- // https://github.com/nodejs/node/blob/1aab13cad9c800f4121c1d35b554b78c1b17bdbd /test/message/test_runner_unresolved_promise.js
1
+ // https://github.com/nodejs/node/blob/5ec2d7bc5deed26ac640feff279800e39dacc9c0 /test/message/test_runner_unresolved_promise.js
2
2
// Flags: --no-warnings
3
3
'use strict'
4
4
require ( '../common' )
5
5
const test = require ( '#node:test' )
6
6
7
7
test ( 'pass' )
8
8
test ( 'never resolving promise' , ( ) => new Promise ( ( ) => { } ) )
9
- test ( 'fail' )
9
+ test ( 'fail' , ( ) => console . log ( 'this should not appear' ) )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ not ok 2 - never resolving promise
17
17
# Subtest: fail
18
18
not ok 3 - fail
19
19
---
20
- duration_ms: *
20
+ duration_ms: 0
21
21
failureType: 'cancelledByParent'
22
22
error: 'test did not finish before its parent and was cancelled'
23
23
code: 'ERR_TEST_FAILURE'
You can’t perform that action at this time.
0 commit comments