Hi all, I'm having some issues running tests with ...
# javascript
g
Hi all, I'm having some issues running tests with coroutines in KotlinJS. When I set it up like in the below screenshot, the test runs immediately and does not wait for the launch coroutine to finish. Is there a way I can setup the test so it will wait on launch to finish?
a
use
runTest
instead of
GlobalScope.launch
Make sure you have
kotlinx-coroutines-test
g
Thanks! Worked perfectly
e
Unrelated, but which mocking lib are you using?
g
Its my own implementation made to match jest since it is difficult to get jest to work with karma.
gratitude thank you 1