Javier
01/27/2021, 11:33 PMcontext
is the problem, using EmptyCoroutineContext
works for me.
About your question, I think using default params let the lib consumer check what is used and change it if the consumer needs it. What do you think about this?
suspend fun <T> Flow<T>.test(
timeout: Duration = 1.seconds,
start: CoroutineStart = UNDISPATCHED,
context: CoroutineContext = Unconfined,
validate: suspend FlowTurbine<T>.() -> Unit
) {
coroutineScope {
...
val collectJob = launch(start = start, context = context) {
...
}
}
}