I’m working on some tests for something that execu...
# kotlin-native
e
I’m working on some tests for something that executes asynchronously. Is there a
runBlocking
coroutines version that works in a
commonTest
for a multi-platform project?
g
No, runBlocking is not available for common coroutines
Only for JVM and Native See this issue for workaround for JS: https://youtrack.jetbrains.com/issue/KT-22228
Upcoming 1.3.30 will have support of suspend test functions
o
I am not so sure
g
oh, it’s sad
e
Ah ok, so I’d need to test this in my
androidTest
package to use JVM. Got it.
g
Not necessary, you can use expect/actual to abstract it for commonTest and even using the trick with dynamic make it work for js
If you need only JVM + Native just use expect/actual