stretchr / testify

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

assert: clarify Eventually documentation #1534

Closed st3penta closed 4 months ago

st3penta commented 4 months ago

Summary

The documentation of the Eventually function is a bit ambiguous, not specifying what happens when the execution of the condition function takes longer than one tick.

Changes

Clarify the Eventually function description by describing the behavior of the condition function execution in the above scenario.

Related issues

Closes #1443

st3penta commented 4 months ago

Actually i found that there are 3 occurrences of this same ticker logic: here, here, and here. Should we replicate the same comment in all those 3 points?

I liked the idea of moving the explanation closer to the implementation, but actually the code itself is pretty simple, so maybe the comment isn't really necessary, what do you think?

arjunmahishi commented 4 months ago

but actually the code itself is pretty simple

Agreed. We can skip it then.