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.
Description
The error docs read:
This indicates that
Error()has aboolreturn value which it hasn't. There is no way to checkexpectedErrorlike this.Expected behavior
Error docs should show actual usage. It would be nice if
Error()actually allowed for checking the specific error value.