Closed wagoodman closed 1 year ago
hey π thanks a lot for opening this issue. I really like this idea. I created a draft pr to support this. I am thinking that the priority should be CI
> snaps.Update
> UPDATE_SNAPS
. So if running on a CI the snaps won't update and will fail. wdyt ?
Have added this on #78 please tell me if that works for you. Again thanks for opening this issue.
π Feature Proposal
It would be great to be able to update snapshots more programmatically:
In this way you could have other test conditions / mechanisms that enforce when a snapshot can and should be updated.
Motivation
Today we use the
flag
package which hooks nicely into the standard test utils:Which can be used like so:
See:
This has the nice quality that:
go test
command with the correct env var while developing on a narrow feature that isn't stable yetExample
Combining the motivation and the feature request:
In which case the flags are the only way to update snapshot files.