if you use `.launch` or `.async`, use the `Dispatc...
# coroutines
z
if you use
.launch
or
.async
, use the
Dispatchers.Unconfined
which should help the coroutine finish before your test does
👌 1
g
Unconfined now uses event loop, so it's not completely syncronous even when running on the same thread
z
In JS?
g
I believe on every platform
And definitely on JVM
z
Yikes. This looks like something that could potentially break all my tests
And we're on Kotlin 1.2 pre-stable co-routines. And that change isn't available until
1.0.0-rc1
which requires 1.3
Should be fun!
g
I had problem in tests, but it was related that I used runBlocking with wrong Unconfined context.
But in general everything worked after migration