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{})
| 288 | // actualObj, err := SomeFunction() |
| 289 | // a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") |
| 290 | func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) { |
| 291 | if h, ok := a.t.(tHelper); ok { |
| 292 | h.Helper() |
| 293 | } |
| 294 | ErrorContainsf(a.t, theError, contains, msg, args...) |
| 295 | } |
| 296 | |
| 297 | // ErrorIs asserts that at least one of the errors in err's chain matches target. |
| 298 | // This is a wrapper for errors.Is. |
nothing calls this directly
no test coverage detected