MCPcopy Create free account
hub / github.com/stretchr/testify / TestEventuallyTrue

Function TestEventuallyTrue

assert/assertions_test.go:2967–2977  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2965}
2966
2967func TestEventuallyTrue(t *testing.T) {
2968 state := 0
2969 condition := func() bool {
2970 defer func() {
2971 state += 1
2972 }()
2973 return state == 2
2974 }
2975
2976 True(t, Eventually(t, condition, 100*time.Millisecond, 20*time.Millisecond))
2977}
2978
2979// errorsCapturingT is a mock implementation of TestingT that captures errors reported with Errorf.
2980type errorsCapturingT struct {

Callers

nothing calls this directly

Calls 2

TrueFunction · 0.70
EventuallyFunction · 0.70

Tested by

no test coverage detected