How can I test async code(like promise) in kotlin....
# javascript
w
How can I test async code(like promise) in kotlin.js?
1
a
g
If your js framework manages asynch (mocha for example) you can make your test returns a promise. The test framework will then wait for the promise completion. See https://github.com/data2viz/data2viz/blob/master/timer/d2v-timer-js/src/test/kotlin/io/data2viz/timer/TimerTests.kt#L18
👍 1