ExpectNoErrorWithOffset checks if "err" is set, and if so, fails assertion while logging the error at "offset" levels above its caller (for example, for call chain f -> g -> ExpectNoErrorWithOffset(1, ...) error would be logged for "f").
(offset int, err error, explain ...interface{})
| 25 | // ExpectNoErrorWithOffset checks if "err" is set, and if so, fails assertion while logging the error at "offset" levels above its caller |
| 26 | // (for example, for call chain f -> g -> ExpectNoErrorWithOffset(1, ...) error would be logged for "f"). |
| 27 | func ExpectNoErrorWithOffset(offset int, err error, explain ...interface{}) { |
| 28 | gomega.ExpectWithOffset(1+offset, err).NotTo(gomega.HaveOccurred(), explain...) |
| 29 | } |