-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Description
The error docs read:
// Error asserts that a function returned an error (i.e. not `nil`).
//
// actualObj, err := SomeFunction()
// if assert.Error(t, err) {
// assert.Equal(t, expectedError, err)
// }
This indicates that Error()
has a bool
return value which it hasn't. There is no way to check expectedError
like this.
Expected behavior
Error docs should show actual usage. It would be nice if Error()
actually allowed for checking the specific error value.