Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a (late) follow-up to #392 and separates control over offset, timeout and polling intervals from the multitude of expectation-related function signatures. In consequence, test writers can stick solely to the baseline of
Expect
,Eventually
,Consistently
in the future:WithOffset(offset int)
on (async) assertions sets the offset, soExpectWithOffset(666, ...).To(FooBar())
can now be written asExpect(...).WithOffset(666).To(FooBar())
. The same applies toEventually
andConsistently
.WithTimeout(interval time.Duration)
andWithPolling(interval time.Duration)
. Here, I opted for a type-safe interface and not repeating "Interval" in the method names, as the function parameter names already carry this meaning.internal/
tests are updated to useWithOffset
,WithTimeout
andWithPolling
.