Christian Sousa
04/15/2020, 4:06 PM@Test
fun fetchAvailableStuff() {
runBlockingTest {
val job = launch(Dispatchers.Main) {
api.fetchAvailableStuff { success ->
println("----------- TEST -----------")
println(success)
}
}
job.join()
}
}
But it gives me:
java.lang.IllegalStateException: This job has not completed yet
I already tried some of the solutions that are in this channel but with no luckSaurabh
04/16/2020, 10:25 AMrunBlockingTest
although I never really solved it. But my tests run fine if I use runBlocking
instead