stretchr / testify

A toolkit with common assertions and mocks that plays nicely with the standard library
MIT License
23.55k stars 1.6k forks source link

Correct the EventuallyWithT and EventuallyWithTf example #1588

Closed JonCrowther closed 7 months ago

JonCrowther commented 7 months ago

Summary

The example used for EventuallyWithT documentation doesn't actually pass.

Changes

Updated the example to be correct by swapping the times used for waitFor and tick

Motivation

I was looking at the docs and, based on the example, mistakenly set waitFor to be a shorter time than tick, which means condition never gets called. Hopefully this helps other people avoid the same mistake.