CLOVIS
02/27/2020, 3:07 PMrusshwolf
02/27/2020, 3:21 PMbrowser()
or nodejs()
call in your js{}
target block.russhwolf
02/27/2020, 3:24 PMjs
instead of target
and your dependencies move to the standard mpp location instead of top-levelJeff
02/27/2020, 4:48 PMinternal actual fun <T> runTest(block: suspend () -> T): dynamic {
return promise { block() }
}
promise isn't being resolved. Should I add a library?russhwolf
02/27/2020, 5:01 PMrusshwolf
02/27/2020, 5:01 PMrusshwolf
02/27/2020, 5:02 PMJeff
02/27/2020, 5:03 PMrusshwolf
02/27/2020, 5:04 PMrusshwolf
02/27/2020, 5:05 PMkotlinx-coroutines-core-js
in your js sources when you uncomment itJeff
02/27/2020, 5:07 PMrusshwolf
02/27/2020, 5:09 PMrusshwolf
02/27/2020, 5:09 PMJeff
02/27/2020, 5:10 PMval jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
api("io.ktor:ktor-client-mock-js:$ktorVersion")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutinesVersion")
}
}
Its core-jsJeff
02/27/2020, 5:11 PMrusshwolf
02/27/2020, 5:14 PMCLOVIS
02/27/2020, 5:36 PMJeff
02/27/2020, 5:41 PMimport kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.promise
internal actual fun <T> runTest(block: suspend () -> T): dynamic {
return GlobalScope.promise { block() }
}