collectFlow

fun <T> TestScope.collectFlow(flow: Flow<T>, collector: suspend (T) -> Unit = {})

Collects a flow in the background.