Issue with running tests on KMM with coroutines-test. Included “org.jetbrains.kotlinx:kotlinx-corout...
s
Issue with running tests on KMM with coroutines-test. Included “org.jetbrains.kotlinxkotlinx coroutines test1.4.2-native-mt” in common tests. Gradle - gradle-6.8.2-bin.zip AS - Canary 9 Android gradle plugin version - 7.0.0-alpha09 Error in 🧵
Error on running allTests
r
coroutines-test is JVM-only at the moment. https://github.com/Kotlin/kotlinx.coroutines/issues/1996
s
Wow! That was super fast. Thank you @russhwolf. Any workarounds?
r
I usually just use runBlocking on native, though it's obviously not ideal
s
Thanks. Will stick to that till I find something better..
j
@russhwolf but I am using test in Multiplatform
runBlockingTest is on coroutines test no?
oh well, it seems it belong to core and I was thinking it was in test
r
runBlocking
is in
kotlinx-coroutines-core
.
runBlockingTest
is in
kotlinx-coroutines-test
. The test module is only available on jvm.
j
Really I always fall in the bug that runBlockingTest doesn't work and runBlocking works so I was using lately runBlocking by default and probably runBlockingTest was in an Android project or something so