awaitError

abstract suspend fun awaitError(): Throwable

Assert that the next event received was an error terminating the flow. This function will suspend if no events have been received.

Throws

app.cash.turbine.AssertionError

if the next event was an item or completion.