ErrorIs asserts that "want" is in "got's" error chain. See the standard library's errors package for details on error chains. On failure, output is identical to Equal.
(tb testing.TB, got, want error, options ...Option)
| 109 | // library's errors package for details on error chains. On failure, output is |
| 110 | // identical to Equal. |
| 111 | func ErrorIs(tb testing.TB, got, want error, options ...Option) bool { |
| 112 | tb.Helper() |
| 113 | if errors.Is(got, want) { |
| 114 | return true |
| 115 | } |
| 116 | report(tb, got, want, "assert.ErrorIs", true /* showWant */, options...) |
| 117 | return false |
| 118 | } |
| 119 | |
| 120 | // False asserts that "got" is false. |
| 121 | func False(tb testing.TB, got bool, options ...Option) bool { |