How to update snapshots with unittest?
See original GitHub issueAppending --update-snapshot
as is done with nosetest, etc throws ImportError: No module named --update-snapshot
. The docs are unclear how exactly to pass this param when using unittest. Is this features supported when using unittest
?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:7
Top Results From Across the Web
Snapshot Testing - Jest
Snapshot tests are a very useful tool whenever you want to make sure your UI does not change unexpectedly.
Read more >Jest: How to Update Snapshot Tests - In Plain English
Run the snapshot test, make sure it passes — if it does not pass, find the problem and fix it, don't change the...
Read more >How to update snapshot with Jest and vue-cli - Stack Overflow
npx vue-cli-service test:unit -u. This will run the tests and upgrade the snapshots. ... npx lerna run test:update:snapshot.
Read more >Creating snapshots in Jest for testing React applications
Learn how to create snapshots in Jest for testing React ... Select the u option to update the snapshot when Jest is in...
Read more >snapshottest · PyPI
If you want to update the snapshots automatically you can use the nosetests --snapshot-update . Check the Unittest example.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I added an environment variable option to #112 so that it doesn’t make things worse for unittest users.
I think it would be better if someone who uses and understands unittest added a
main
override if we decide we do want one.An alternative could be to set it in an environment variable. What do you think about that approach?