ErrorContainsf asserts that a function returned an error (i.e. not `nil`) and that the error contains the specified substring. actualObj, err := SomeFunction() a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted")
(theError error, contains string, msg string, args ...interface{})
| 271 | // actualObj, err := SomeFunction() |
| 272 | // a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") |
| 273 | func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool { |
| 274 | if h, ok := a.t.(tHelper); ok { |
| 275 | h.Helper() |
| 276 | } |
| 277 | return ErrorContainsf(a.t, theError, contains, msg, args...) |
| 278 | } |
| 279 | |
| 280 | // ErrorIs asserts that at least one of the errors in err's chain matches target. |
| 281 | // This is a wrapper for errors.Is. |
nothing calls this directly
no test coverage detected