-
Notifications
You must be signed in to change notification settings - Fork 50
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
Expose golden.flagUpdate with a golden.FlagUpdate method #205
Comments
odsod
added a commit
to odsod/gotest.tools
that referenced
this issue
Jul 15, 2020
Returns true when the -test.update-golden flag has been set. Fixes: gotestyourself#205
odsod
added a commit
to odsod/gotest.tools
that referenced
this issue
Jul 15, 2020
Returns true when the -test.update-golden flag has been set. Fixes: gotestyourself#205
I think this may be related to #8 in some ways. One thing I've done to handle this type of problem is this: https:/gotestyourself/gotestsum/blob/master/internal/text/testing.go#L12-L28, you can see it used here: https:/gotestyourself/gotestsum/blob/e2b19e158466ef6e6da12a3c7d0dd0fb825ac740/testjson/dotformat_test.go#L33-L34 By processing the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For golden file tests that want to perform custom assertions (for example read proto messages from a golden file and perform a comparison assertion on the parsed message) it would be useful to expose the flagUpdate variable, so that the same flag can be used for all golden file tests (redefining this flag results in a panic).
The text was updated successfully, but these errors were encountered: