MCPcopy Create free account
hub / github.com/stretchr/testify / ErrorIsf

Function ErrorIsf

require/require.go:364–372  ·  view source on GitHub ↗

ErrorIsf asserts that at least one of the errors in err's chain matches target. This is a wrapper for errors.Is.

(t TestingT, err error, target error, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

362// ErrorIsf asserts that at least one of the errors in err's chain matches target.
363// This is a wrapper for errors.Is.
364func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) {
365 if h, ok := t.(tHelper); ok {
366 h.Helper()
367 }
368 if assert.ErrorIsf(t, err, target, msg, args...) {
369 return
370 }
371 t.FailNow()
372}
373
374// Errorf asserts that a function returned an error (i.e. not `nil`).
375//

Callers 1

ErrorIsfMethod · 0.70

Calls 3

ErrorIsfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected