stretchr / testify

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

Correct the EventuallyWithT and EventuallyWithTf example #1588

Closed JonCrowther closed 2 months ago

JonCrowther commented 2 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.