-
-
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
Merged
rickhanlonii
merged 18 commits into
jestjs:master
from
genintho:3831-doc-interactive-mode
Feb 10, 2018
Merged
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
158d258
add changelog record for #3831
genintho 0dd8861
Merge remote-tracking branch 'upstream/master' into 3831-doc-interact…
genintho 66db760
nicer description
genintho c18f238
new section in snapshot doc about interactive mode
genintho 8610515
optimized screen shot
genintho bedff40
document itself in changelog
genintho 254c9a3
Merge remote-tracking branch 'upstream/master' into 3831-doc-interact…
genintho 1b0ef55
replace png by gif
genintho c5fe774
fix description
genintho 86c9617
typos
genintho 1869e6d
Merge remote-tracking branch 'upstream/master' into 3831-doc-interact…
c6ad4ce
Merge remote-tracking branch 'upstream/master' into 3831-doc-interact…
genintho d03d59f
Merge remote-tracking branch 'upstream/master' into 3831-doc-interact…
rickhanlonii 094c2fc
Move changelog update to master
rickhanlonii f79b9f5
Updates to changelog language
rickhanlonii c3e6289
Minor language updates
rickhanlonii c08e0a2
rm "the"
rickhanlonii 6bb5999
s/file/suite
rickhanlonii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -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 | ||
|
||
The snapshots of one test file can be updated in the Jest watch mode: | ||
|
||
![](/jest/img/content/interactiveSnapshot.png) | ||
|
||
Once you enter the Interactive Snapshot Updates mode, Jest will walk you though | ||
the failed snapshots of one test file at a time and give you an opportunity to | ||
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. I think there's an extra "of" here - should be:
Also |
||
review the failed output. | ||
|
||
From here you can choose to update that snapshot or skip to the next: | ||
|
||
![](/jest/img/content/interactiveSnapshotUpdate.gif) | ||
|
||
### Tests Should Be Deterministic | ||
|
||
Your tests should be deterministic. That is, running the same tests multiple | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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