MCPcopy Create free account
hub / github.com/jmespath/go-jmespath / Errorf

Function Errorf

internal/testify/assert/assertion_format.go:110–115  ·  view source on GitHub ↗

Errorf asserts that a function returned an error (i.e. not `nil`). actualObj, err := SomeFunction() if assert.Errorf(t, err, "error message %s", "formatted") { assert.Equal(t, expectedErrorf, err) }

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

Source from the content-addressed store, hash-verified

108// assert.Equal(t, expectedErrorf, err)
109// }
110func Errorf(t TestingT, err error, msg string, args ...interface{}) bool {
111 if h, ok := t.(tHelper); ok {
112 h.Helper()
113 }
114 return Error(t, err, append([]interface{}{msg}, args...)...)
115}
116
117// Eventuallyf asserts that given condition will be met in waitFor time,
118// periodically checking target function each tick.

Callers 3

ErrorfFunction · 0.92
TestErrorFunction · 0.70
ErrorfMethod · 0.70

Calls 2

ErrorFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestErrorFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…