The snapshotted stack frames should hide node internal stack frames so that general node core development does not need updating the snapshot. For userland stack frames, they are highly fixture related and any fixture change should reflect in a change of the snapshot. Additionally, the line and column number are highly relevant to the correctness of the snapshot, these should not be redacted. A change in node core that affects userland stack frames should be alarming and be reflected in the snapshots. Features like test runner and source map support both should snapshot userland stack frames to ensure that userland code locations are computed correctly. PR-URL: https://github.com/nodejs/node/pull/61665 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
76 lines
2.1 KiB
Text
76 lines
2.1 KiB
Text
TAP version 13
|
|
# Subtest: --test-timeout is set to 100ms
|
|
# Subtest: should timeout after 100ms
|
|
not ok 1 - should timeout after 100ms
|
|
---
|
|
duration_ms: *
|
|
type: 'test'
|
|
location: '<project-root>/test/fixtures/test-runner/output/test-timeout-flag.js:8:3'
|
|
failureType: 'testTimeoutFailure'
|
|
error: 'test timed out after 100ms'
|
|
code: 'ERR_TEST_FAILURE'
|
|
stack: |-
|
|
async Promise.all (index 0)
|
|
...
|
|
# Subtest: should timeout after 5ms
|
|
not ok 2 - should timeout after 5ms
|
|
---
|
|
duration_ms: *
|
|
type: 'test'
|
|
location: '<project-root>/test/fixtures/test-runner/output/test-timeout-flag.js:16:3'
|
|
failureType: 'testTimeoutFailure'
|
|
error: 'test timed out after 5ms'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: should not timeout
|
|
ok 3 - should not timeout
|
|
---
|
|
duration_ms: *
|
|
type: 'test'
|
|
...
|
|
# Subtest: should pass
|
|
ok 4 - should pass
|
|
---
|
|
duration_ms: *
|
|
type: 'test'
|
|
...
|
|
1..4
|
|
not ok 1 - --test-timeout is set to 100ms
|
|
---
|
|
duration_ms: *
|
|
type: 'suite'
|
|
location: '<project-root>/test/fixtures/test-runner/output/test-timeout-flag.js:5:1'
|
|
failureType: 'subtestsFailed'
|
|
error: '2 subtests failed'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
# Subtest: should inherit timeout options to children
|
|
# Subtest: should timeout after 1ms
|
|
not ok 1 - should timeout after 1ms
|
|
---
|
|
duration_ms: *
|
|
type: 'test'
|
|
location: '<project-root>/test/fixtures/test-runner/output/test-timeout-flag.js:51:3'
|
|
failureType: 'cancelledByParent'
|
|
error: 'test did not finish before its parent and was cancelled'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
1..1
|
|
not ok 2 - should inherit timeout options to children
|
|
---
|
|
duration_ms: *
|
|
type: 'suite'
|
|
location: '<project-root>/test/fixtures/test-runner/output/test-timeout-flag.js:42:1'
|
|
failureType: 'testTimeoutFailure'
|
|
error: 'test timed out after 1ms'
|
|
code: 'ERR_TEST_FAILURE'
|
|
...
|
|
1..2
|
|
# tests 5
|
|
# suites 2
|
|
# pass 2
|
|
# fail 0
|
|
# cancelled 3
|
|
# skipped 0
|
|
# todo 0
|
|
# duration_ms *
|