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

How to automatically update snapshots #1

Open
sudoFerraz opened this issue Mar 8, 2023 · 1 comment
Open

How to automatically update snapshots #1

sudoFerraz opened this issue Mar 8, 2023 · 1 comment

Comments

@sudoFerraz
Copy link

Hi,

Currently when using snapshot test matchers, one needs to update all snapshots manually after they are created for the first time. When refactoring a large code base, this gets quickly out of control.

Is there a way to automatically update the gas snapshots with a command or an environment variable?

@jksgfsdfd
Copy link

If you are using Hardhat, setting UPDATE_SNAPSHOT=1 will update the snapshots.
UPDATE_SNAPSHOT=1 yarn hardhat test

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

No branches or pull requests

2 participants