-
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
assert: ErrorIs #208
assert: ErrorIs #208
Conversation
Was there a reason this got abandoned? Is it something I could pick up and finish off? I found myself wanting to do an |
There is https://pkg.go.dev/gotest.tools/v3/assert#ErrorType, but I'll run CI again to see what state this is in. From the previous runs it looks like I probably put this on hold because I wasn't too sure what the failure messages should look like. I guess that would probably be the last thing to figure out before getting this merged. |
55cdfd3
to
0475f45
Compare
Ah, I've checked the branch out and I see what you mean. Potentially for
|
Call t.Helper if it exists
For comparing errors using errors.Is.
0475f45
to
ae5beef
Compare
Expected strings can be pretty long sometimes.
I rebased this again and fixed the tests. Removing I guess we could also print all the wrapped types. Right now it's only printing the top-level type along with the name of the symbol and error message. I marked this as ready for review. If you don't have a need for the full chain of wrapped types I'd be fine to merge this as-is and we could look at adding it later. But if you are interested in adding that to the message I can keep this open for a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't have a need for the full chain of wrapped types I'd be fine to merge this as-is
Yeah, this was more of a "it'd be cool if..." than a concrete need
Thanks for the nudge to get this included, and for giving it a review! |
No description provided.