-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for Interactive Snapshot Update #5291
Changes from 6 commits
158d258
0dd8861
66db760
c18f238
8610515
bedff40
254c9a3
1b0ef55
c5fe774
86c9617
1869e6d
c6ad4ce
d03d59f
094c2fc
f79b9f5
c3e6289
c08e0a2
6bb5999
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,20 @@ You can try out this functionality by cloning the | |
[snapshot example](https://github.com/facebook/jest/tree/master/examples/snapshot), | ||
modifying the `Link` component, and running Jest. | ||
|
||
#### Interactive Updates | ||
|
||
Snapshots can also be updated one at a time in the Jest watch mode: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not entirely true, as interaction with snapshots happens test file by test file, not test by test. Can you fix the description to be more accurate (including the paragraph below)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thymikee good catch, this is my bad as it's in my copy above Related to this, the skip option still says "Press s to skip the current snapshot" |
||
|
||
![](/jest/img/content/interactiveSnapshot.png) | ||
|
||
Once you enter the Interactive Snapshot Updates mode, Jest will walk you though | ||
the failed snapshots one at a time and give you an opportunity to review the | ||
failed output. | ||
|
||
From here you can choose to update that snapshot or skip to the next: | ||
|
||
![](/jest/img/content/interactiveSnapshotUpdate.png) | ||
|
||
### Tests Should Be Deterministic | ||
|
||
Your tests should be deterministic. That is, running the same tests multiple | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - this is
[docs]
everywhere else