mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
3759935ee2
test_runner: fix afterEach not running on test failures PR-URL: https://github.com/nodejs/node/pull/45204 Fixes: https://github.com/nodejs/node/issues/45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
486 lines
7.9 KiB
Plaintext
486 lines
7.9 KiB
Plaintext
TAP version 13
|
|
# Subtest: describe hooks
|
|
# Subtest: 1
|
|
ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: 2
|
|
ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: nested
|
|
# Subtest: nested 1
|
|
ok 1 - nested 1
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: nested 2
|
|
ok 2 - nested 2
|
|
---
|
|
duration_ms: *
|
|
...
|
|
1..2
|
|
ok 3 - nested
|
|
---
|
|
duration_ms: *
|
|
...
|
|
1..3
|
|
ok 1 - describe hooks
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: before throws
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'cancelledByParent'
|
|
error: 'test did not finish before its parent and was cancelled'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: 2
|
|
not ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
failureType: 'cancelledByParent'
|
|
error: 'test did not finish before its parent and was cancelled'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
1..2
|
|
not ok 2 - before throws
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running before hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: after throws
|
|
# Subtest: 1
|
|
ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: 2
|
|
ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
...
|
|
1..2
|
|
not ok 3 - after throws
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running after hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: beforeEach throws
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running beforeEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
not ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running beforeEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
1..2
|
|
not ok 4 - beforeEach throws
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '2 subtests failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: afterEach throws
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running afterEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
not ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running afterEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
1..2
|
|
not ok 5 - afterEach throws
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '2 subtests failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: afterEach when test fails
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'testCodeFailure'
|
|
error: 'test'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
...
|
|
1..2
|
|
not ok 6 - afterEach when test fails
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '1 subtest failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: afterEach throws and test fails
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'testCodeFailure'
|
|
error: 'test'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
not ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running afterEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
1..2
|
|
not ok 7 - afterEach throws and test fails
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '2 subtests failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: test hooks
|
|
# Subtest: 1
|
|
ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: 2
|
|
ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: nested
|
|
# Subtest: nested 1
|
|
ok 1 - nested 1
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: nested 2
|
|
ok 2 - nested 2
|
|
---
|
|
duration_ms: *
|
|
...
|
|
1..2
|
|
ok 3 - nested
|
|
---
|
|
duration_ms: *
|
|
...
|
|
1..3
|
|
ok 8 - test hooks
|
|
---
|
|
duration_ms: *
|
|
...
|
|
# Subtest: t.beforeEach throws
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running beforeEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
not ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running beforeEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
1..2
|
|
not ok 9 - t.beforeEach throws
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '2 subtests failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: t.afterEach throws
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running afterEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
not ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running afterEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
1..2
|
|
not ok 10 - t.afterEach throws
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '2 subtests failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: afterEach when test fails
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'testCodeFailure'
|
|
error: 'test'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
...
|
|
1..2
|
|
not ok 11 - afterEach when test fails
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '1 subtest failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: afterEach throws and test fails
|
|
# Subtest: 1
|
|
not ok 1 - 1
|
|
---
|
|
duration_ms: *
|
|
failureType: 'testCodeFailure'
|
|
error: 'test'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
# Subtest: 2
|
|
not ok 2 - 2
|
|
---
|
|
duration_ms: *
|
|
failureType: 'hookFailed'
|
|
error: 'failed running afterEach hook'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
...
|
|
1..2
|
|
not ok 12 - afterEach throws and test fails
|
|
---
|
|
duration_ms: *
|
|
failureType: 'subtestsFailed'
|
|
error: '2 subtests failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
1..12
|
|
# tests 12
|
|
# pass 2
|
|
# fail 10
|
|
# cancelled 0
|
|
# skipped 0
|
|
# todo 0
|
|
# duration_ms *
|