hey guys, is it possible to test Flows on Kotlin M...
# coroutines
m
hey guys, is it possible to test Flows on Kotlin Multiplatform (
commonTest
,
androidTest
,
iosTest
) ? how to deal with Coroutine Context?
a
Hello, have you tried to use
TestCoroutineDispatcher*()
from* kotlinx-coroutines-test/kotlinx.coroutines.test/TestCoroutineDispatcher
m
That's not usable from common code since it is JVM only.
🎯 2
a
Oh I see, thanks for letting me know, I only tried it on the JVM, good catch
👍 1
m
I would look into using turbine. https://github.com/cashapp/turbine
👍 2
🎯 1
🔍 1
m
thank you @mkrussel this has worked as expected 🙏
👍 1