File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 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
22
33'use strict'
44
@@ -525,6 +525,7 @@ class Test extends AsyncResource {
525525
526526 // The test has run, so recursively cancel any outstanding subtests and
527527 // mark this test as failed if any subtests failed.
528+ this . pendingSubtests = [ ]
528529 for ( let i = 0 ; i < this . subtests . length ; i ++ ) {
529530 const subtest = this . subtests [ i ]
530531
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
22// Flags: --no-warnings
33'use strict'
44require ( '../common' )
55const test = require ( '#node:test' )
66
77test ( 'pass' )
88test ( '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
1717# Subtest: fail
1818not ok 3 - fail
1919 ---
20- duration_ms: *
20+ duration_ms: 0
2121 failureType: 'cancelledByParent'
2222 error: 'test did not finish before its parent and was cancelled'
2323 code: 'ERR_TEST_FAILURE'
You can’t perform that action at this time.
0 commit comments