MCPcopy
hub / github.com/stretchr/testify / TestEventuallyWithTTrue

Function TestEventuallyWithTTrue

require/requirements_test.go:774–790  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

772}
773
774func TestEventuallyWithTTrue(t *testing.T) {
775 t.Parallel()
776
777 mockT := new(MockT)
778
779 counter := 0
780 condition := func(collect *assert.CollectT) {
781 defer func() {
782 counter += 1
783 }()
784 True(collect, counter == 1)
785 }
786
787 EventuallyWithT(mockT, condition, 100*time.Millisecond, 20*time.Millisecond)
788 False(t, mockT.Failed, "Check should pass")
789 Equal(t, 2, counter, "Condition is expected to be called 2 times")
790}

Callers

nothing calls this directly

Calls 4

TrueFunction · 0.70
EventuallyWithTFunction · 0.70
FalseFunction · 0.70
EqualFunction · 0.70

Tested by

no test coverage detected