How can I run a test with coroutines in Kotlin/JS ...
# javascript
d
How can I run a test with coroutines in Kotlin/JS ? Currently, I am using
GlobalScope.launch
because there is no
runBlocking
in Kotlin/JS. However, assertion errors are not correctly collected and the test doesn't fail when an assertion fails.
Copy code
@Test
fun testSimple() = GlobalScope.launch {
    // ...
}
And the issue to wait for a multi-platform
kotlinx-corountine-test
with some workarounds: https://github.com/Kotlin/kotlinx.coroutines/issues/1996