test_runner: run global after() hook earlier #41782
Annotations
2 errors
test-macOS:
test/parallel/test-runner-output.mjs#L1
--- stdout ---
TAP version 13
# Subtest: test runner output
# Subtest: test-runner/output/abort.js
ok 1 - test-runner/output/abort.js
---
duration_ms: 1403.167661
...
# Subtest: test-runner/output/abort_suite.js
ok 2 - test-runner/output/abort_suite.js
---
duration_ms: 1400.994089
...
# Subtest: test-runner/output/abort_hooks.js
ok 3 - test-runner/output/abort_hooks.js
---
duration_ms: 1036.894106
...
# Subtest: test-runner/output/describe_it.js
ok 4 - test-runner/output/describe_it.js
---
duration_ms: 1669.908712
...
# Subtest: test-runner/output/describe_nested.js
ok 5 - test-runner/output/describe_nested.js
---
duration_ms: 1020.902327
...
# Subtest: test-runner/output/hooks.js
ok 6 - test-runner/output/hooks.js
---
duration_ms: 1348.58854
...
# Subtest: test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js
ok 7 - test-runner/output/timeout_in_before_each_should_not_affect_further_tests.js
---
duration_ms: 1569.60047
...
# Subtest: test-runner/output/hooks-with-no-global-test.js
ok 8 - test-runner/output/hooks-with-no-global-test.js
---
duration_ms: 746.685214
...
# Subtest: test-runner/output/before-and-after-each-too-many-listeners.js
ok 9 - test-runner/output/before-and-after-each-too-many-listeners.js
---
duration_ms: 891.252165
...
# Subtest: test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js
ok 10 - test-runner/output/before-and-after-each-with-timeout-too-many-listeners.js
---
duration_ms: 878.437188
...
# Subtest: test-runner/output/global_after_should_fail_the_test.js
not ok 11 - test-runner/output/global_after_should_fail_the_test.js
---
duration_ms: 851.843492
location: 'file:///Users/runner/work/node/node/test/parallel/test-runner-output.mjs:101:5'
failureType: 'testCodeFailure'
error: |-
Expected values to be strictly equal:
+ actual - expected ... Lines skipped
'this is a test\n' +
'TAP version 13\n' +
...
' ---\n' +
' duration_ms: *\n' +
- ' ...\n' +
- 'not ok 2 - /test/fixtures/test-runner/output/global_after_should_fail_the_test.js\n' +
- ' ---\n' +
- ' duration_ms: *\n' +
- " location: '/test/fixtures/test-runner/output/global_after_should_fail_the_test.js:(LINE):1'\n" +
- " failureType: 'hookFailed'\n" +
- " error: 'this should fail the test'\n" +
- " code: 'ERR_TEST_FAILURE'\n" +
- ' stack: |-\n' +
- ' *\n' +
- ' *\n' +
- ' *\n' +
- ' *\n' +
- ' *\n' +
- ' *\n' +
- ' *\n' +
- ' *\n' +
- ' *\n' +
' ...\n' +
...
'# skipped 0\n' +
'# todo 0\n' +
'# duration_ms *\n'
code: 'ERR_ASSERTION'
name: 'AssertionError'
expected: |-
this is a test
TAP version 13
# Subtest: this is a test
ok 1 - this is a test
---
duration_ms: *
...
not ok 2 - /test/fixtures/test-runner/output/global_after_should_fail_the_test.js
---
duration_ms: *
location: '/test/fixtures/test-runner/output/global_after_should_fail_the_test.js:(LINE):1'
failureType: 'hookFailed'
error: 'this should fail the test'
code: 'ERR_TEST_FAILURE'
stack: |-
*
*
*
*
*
*
*
*
*
...
1..1
# tests 1
# suites 0
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms *
actual: |-
this is a test
|
test-macOS
Process completed with exit code 2.
|