turbine / app.cash.turbine / FlowTurbine / expectEvent

expectEvent

abstract suspend fun expectEvent(): Event<T>

Assert that an event was received and return it. If no events have been received, this function will suspend for up to timeout.

Exceptions

TimeoutCancellationException - if no event was received in time.