Is runblocking not available in KN?
# kotlin-native
j
Is runblocking not available in KN?
b
It is, but it only exists in native and jvm, so if you want to use it in common code, you have to add an expect/actual
👍 3
j
What should the method signature look like? expect fun runBlocking(block: () -> Unit) will still results in "should be called only from a coroutine or another suspend function"
Is there an alternate way to test coroutine code in unit test?
b
Not that I’m aware
I just copied the method signature from the original native/jvm declaration
👍 1
j
That worked, thanks for help @basher
b
No problem!
f