I'm testing the behavior of an asynchronous callback-based api. The callback can be called asynchronously by the api multiple times, each time with a result.
I'd like to repeatedly check if each result fed to the callback is the expected value. But I'd like to stop doing this once a timeout has been reached. At that time I'd like to fail and exit the test.
How may I achieve this in Kotest?