Skip to content
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

add notes on how to update the jest snapshots that are used for regression testing of /admin #321

Open
jspaaks opened this issue Jan 22, 2020 · 2 comments

Comments

@jspaaks
Copy link
Member

jspaaks commented Jan 22, 2020

It is my understanding that /admin uses snapshot testing to avoid regressions
https://jestjs.io/docs/en/snapshot-testing

However, I was unable to generate updated snapshots after updating the admin interface. The tests failed because the newly generated app (purposely) differed from the stored snapshots.

So it's probably a good idea to decribe in /admin/README.md when and how to update the snapshots.

@jspaaks
Copy link
Member Author

jspaaks commented Feb 14, 2020

something like

cd admin
yarn install
yarn test
# (press 'a' to run all tests)
# (press 'w' to show more watch commands)
# (press 'u' to update failing snapshots)

@Tommos0
Copy link
Contributor

Tommos0 commented Feb 17, 2020

yarn test -u should update the snapshots (or pick the 'u' option in the menu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants