@@ -204,7 +204,8 @@ func Expect(actual interface{}, extra ...interface{}) Assertion {
204
204
// ExpectWithOffset(1, "foo").To(Equal("foo"))
205
205
//
206
206
// Unlike `Expect` and `Ω`, `ExpectWithOffset` takes an additional integer argument
207
- // that is used to modify the call-stack offset when computing line numbers.
207
+ // that is used to modify the call-stack offset when computing line numbers. It is
208
+ // the same as `Expect(...).WithOffset`.
208
209
//
209
210
// This is most useful in helper functions that make assertions. If you want Gomega's
210
211
// error message to refer to the calling line in the test (as opposed to the line in the helper function)
@@ -300,6 +301,9 @@ For example:
300
301
}).Should(Succeed())
301
302
302
303
will rerun the function until all assertions pass.
304
+
305
+ `Eventually` specifying a timeout interval (and an optional polling interval) are
306
+ the same as `Eventually(...).WithTimeout` or `Eventually(...).WithTimeout(...).WithPolling`.
303
307
*/
304
308
func Eventually (actual interface {}, intervals ... interface {}) AsyncAssertion {
305
309
ensureDefaultGomegaIsConfigured ()
@@ -309,6 +313,12 @@ func Eventually(actual interface{}, intervals ...interface{}) AsyncAssertion {
309
313
// EventuallyWithOffset operates like Eventually but takes an additional
310
314
// initial argument to indicate an offset in the call stack. This is useful when building helper
311
315
// functions that contain matchers. To learn more, read about `ExpectWithOffset`.
316
+ //
317
+ // `EventuallyWithOffset` is the same as `Eventually(...).WithOffset`.
318
+ //
319
+ // `EventuallyWithOffset` specifying a timeout interval (and an optional polling interval) are
320
+ // the same as `Eventually(...).WithOffset(...).WithTimeout` or
321
+ // `Eventually(...).WithOffset(...).WithTimeout(...).WithPolling`.
312
322
func EventuallyWithOffset (offset int , actual interface {}, intervals ... interface {}) AsyncAssertion {
313
323
ensureDefaultGomegaIsConfigured ()
314
324
return Default .EventuallyWithOffset (offset , actual , intervals ... )
@@ -337,6 +347,9 @@ func Consistently(actual interface{}, intervals ...interface{}) AsyncAssertion {
337
347
// ConsistentlyWithOffset operates like Consistently but takes an additional
338
348
// initial argument to indicate an offset in the call stack. This is useful when building helper
339
349
// functions that contain matchers. To learn more, read about `ExpectWithOffset`.
350
+ //
351
+ // `ConsistentlyWithOffset` is the same as `Consistently(...).WithOffset` and
352
+ // optional `WithTimeout` and `WithPolling`.
340
353
func ConsistentlyWithOffset (offset int , actual interface {}, intervals ... interface {}) AsyncAssertion {
341
354
ensureDefaultGomegaIsConfigured ()
342
355
return Default .ConsistentlyWithOffset (offset , actual , intervals ... )
0 commit comments