-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: removed tap bail and added snapshots
- Loading branch information
1 parent
5b69804
commit 6678a3b
Showing
6 changed files
with
83 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Flags: --test-bail --test-reporter=tap | ||
'use strict'; | ||
const common = require('../../../common'); | ||
const assert = require('assert'); | ||
const test = require('node:test'); | ||
|
||
test('keep error', (t) => { | ||
assert.strictEqual(0, 1); | ||
}); | ||
|
||
test('dont show', common.mustNotCall((t) => { | ||
assert.strictEqual(0, 2); | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
TAP version 13 | ||
not ok 1 - keep error | ||
--- | ||
duration_ms: * | ||
location: '/test/fixtures/test-runner/output/bail-error.js:(LINE):1' | ||
failureType: 'testCodeFailure' | ||
error: |- | ||
Expected values to be strictly equal: | ||
|
||
0 !== 1 | ||
|
||
code: 'ERR_ASSERTION' | ||
name: 'AssertionError' | ||
expected: 1 | ||
actual: 0 | ||
operator: 'strictEqual' | ||
stack: |- | ||
* | ||
* | ||
* | ||
* | ||
* | ||
... | ||
1..2 | ||
# tests 2 | ||
# suites 0 | ||
# pass 0 | ||
# fail 1 | ||
# cancelled 1 | ||
# skipped 0 | ||
# todo 0 | ||
# duration_ms * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
TAP version 13 | ||
# Subtest: nested | ||
# Subtest: first | ||
ok 1 - first | ||
--- | ||
duration_ms: * | ||
... | ||
not ok 2 - second | ||
--- | ||
duration_ms: * | ||
location: '/test/fixtures/test-runner/output/bail.js:(LINE):5' | ||
failureType: 'cancelledByParent' | ||
error: 'test did not finish before its parent and was cancelled' | ||
code: 'ERR_TEST_FAILURE' | ||
... | ||
1..3 | ||
not ok 1 - nested | ||
--- | ||
duration_ms: * | ||
location: '/test/fixtures/test-runner/output/bail.js:(LINE):1' | ||
failureType: 'subtestsFailed' | ||
error: '2 subtests failed' | ||
code: 'ERR_TEST_FAILURE' | ||
... | ||
1..2 | ||
# tests 5 | ||
# suites 0 | ||
# pass 1 | ||
# fail 2 | ||
# cancelled 2 | ||
# skipped 0 | ||
# todo 0 | ||
# duration_ms * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters