You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just in my opinion; assertions dealing with a specific type of any may be too much of a reach for the testify API. If any builtin function or standard library panics an error then I'd be more receptive.
The assertion function ErrorIs is already implemented. So i guess if there was ever a discussion. Someone decided to implement it.
Ad hoc there is no standard library that panics with an error that comes in mind. But at least panicking as well es ErrorIs as well as error wrapping is all part of the standard libraries.
Activity
Add PanicsWithErrorIs assertions (stretchr#1350)
jannisbaudisch commentedon Feb 27, 2023
Implemented in pull request #1353
[-]Missing functionality to assert panics with errors.Is()[/-][+]assert: add PanicsWithErrorIs[/+]dolmen commentedon Jul 5, 2023
@brackendawson You voted this issue down. Do you have a comment?
brackendawson commentedon Jul 10, 2023
Just in my opinion; assertions dealing with a specific type of
anymay be too much of a reach for the testify API. If any builtin function or standard library panics anerrorthen I'd be more receptive.jannisbaudisch commentedon Jul 18, 2023
The assertion function ErrorIs is already implemented. So i guess if there was ever a discussion. Someone decided to implement it.
Ad hoc there is no standard library that panics with an error that comes in mind. But at least panicking as well es ErrorIs as well as error wrapping is all part of the standard libraries.
mail2nnv commentedon Oct 19, 2023
I'll add my five cents. Besides the specified
PanicsWithErrorIsmethod, I lack thePanicsWithErrorContains().https://go.dev/play/p/-ePsCuCxyW1