-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that t.snapshot.skip() prevents updating snapshots
- Loading branch information
Showing
6 changed files
with
56 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const test = require('ava'); | ||
|
||
test('always failing snapshot', t => { | ||
t.snapshot(Date.now()); | ||
}); | ||
|
||
test('skipped assertion', t => { | ||
t.snapshot.skip(Date.now()); // eslint-disable-line ava/no-skip-assert | ||
t.pass(); | ||
}); |
11 changes: 11 additions & 0 deletions
11
test/snapshot-updates/fixtures/contains-skip-assertion.js.md
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,11 @@ | ||
# Snapshot report for `contains-skip-assertion.js` | ||
|
||
The actual snapshot is saved in `contains-skip-assertion.js.snap`. | ||
|
||
Generated by [AVA](https://avajs.dev). | ||
|
||
## always failing snapshot | ||
|
||
> Snapshot 1 | ||
1607992742963 |
Binary file not shown.
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
Binary file not shown.
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