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

Do not spew results using Stringer methods? #45

Closed
bradleyjkemp opened this issue Oct 17, 2018 · 1 comment · Fixed by #66
Closed

Do not spew results using Stringer methods? #45

bradleyjkemp opened this issue Oct 17, 2018 · 1 comment · Fixed by #66

Comments

@bradleyjkemp
Copy link
Owner

This can hide significant portions of the result being spewed and unnecessarily ties snapshots to the (designed for users) String() implementation.

This should just involve setting DisableMethods: true in the Spew config but we need to check that this isn't going to affect any known users (https://github.com/search?l=Go&o=desc&q="bradleyjkemp%2Fcupaloy"&s=indexed&type=Code) i.e. that no one is currently snapshotting types implementing the Stringer interface

@bradleyjkemp
Copy link
Owner Author

Hmm, might need to think about this one: see test failures in #46

@bradleyjkemp bradleyjkemp removed the bug label Oct 18, 2018
gilbsgilbs added a commit to gilbsgilbs/cupaloy that referenced this issue Aug 31, 2020
This is especially annoying for snapshotting custom errors that contain
some payload. The payload would arbitrary be dismissed which is
confusing.

fixes bradleyjkemp#45
gilbsgilbs added a commit to gilbsgilbs/cupaloy that referenced this issue Aug 31, 2020
This is especially annoying for snapshotting custom errors that contain
some payload. The payload would arbitrary be dismissed which is
confusing.

fixes bradleyjkemp#45
bradleyjkemp added a commit that referenced this issue Sep 10, 2020
This is especially annoying for snapshotting custom errors that contain
some payload. The payload would arbitrary be dismissed which is
confusing.

fixes #45

Co-authored-by: Bradley Kemp <bradleyjkemp@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

1 participant