I moved from `runBlocking` to `runTest` in unit te...
# test
u
I moved from
runBlocking
to
runTest
in unit tests, and now I get this
Copy code
kotlinx.coroutines.test.UncaughtExceptionsBeforeTest: There were uncaught exceptions before the test started. Please avoid this, as such exceptions are also reported in a platform-dependent manner so that they are not lost.
        at app//kotlinx.coroutines.test.TestScopeImpl.enter(TestScope.kt:242)
        at app//kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:307)
        at app//kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(Unknown Source)
        at app//kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:166)
        at app//kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(Unknown Source)
        at app//kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0$default(TestBuilders.kt:158)
        at app//kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0$default(Unknown Source)
is there an way to debug this, to figure out what error?
Copy code
@Test
fun `foo bar quax`() = runTest {
   ...
}
the test is shaped as always like this .. so not sure how can any issue happen BEFORE
runTest
338 Views