You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -878,6 +878,14 @@ succeeds if `ACTUAL` is a non-nil `error` that matches `EXPECTED`. `EXPECTED` mu
878
878
879
879
Any other type for `EXPECTED` is an error. It is also an error for `ACTUAL` to be nil. Note that `FUNCTION_ERROR_DESCRIPTION` is a description of the error function, if used. This is required when passing a function but is ignored in all other cases.
880
880
881
+
#### MatchErrorStrictly(expected any)
882
+
883
+
```go
884
+
Ω(ACTUAL).Should(MatchErrorSTrictly(EXEPCTED))
885
+
```
886
+
887
+
succeeds if and only if `ACTUAL` and `EXPECTED` are non-nil and `errors.Is(ACTUAL, EXPECTED)` returns `true`. This is stricter than `MatchError` which will fall back on string comparison.
0 commit comments