Sabeeh
05/14/2024, 7:40 PMrunBlockingTest
or runTest
for running suspend tests in a Kotlin/Wasm (wasmJs) target?
For js I'm doing following and its working fine:
in commonTest:
expect fun runTest(block: suspend () -> Unit)
in jsTest:
actual fun runTest(block: suspend () -> Unit): dynamic = GlobalScope.promise { block() }
This is not working for wasmJs because dynamic
is not supported in wasmJs.russhwolf
05/15/2024, 6:30 PMrunTest
defined in kotlinx-coroutines-test that you can use from wasm on the most recent version.