expectNoEvents

fun <T> ReceiveChannel<T>.expectNoEvents(name: String? = null)

Assert that there are no unconsumed events which have already been received.

A channel in the closed state will always emit either Event.Complete or Event.Error when read, so expectNoEvents will only succeed on an empty ReceiveChannel that is not closed.

Throws

if unconsumed events are found.