koufa
04/05/2023, 8:31 PMfun test3() {
applicationScope.launch {
throw IllegalStateException("test")
}
}
Using assertFails does not work as it fails with the message that the the function test3 did not failmkrussel
04/05/2023, 8:36 PMJoffrey
04/05/2023, 9:05 PMtest3() doesn't fail, so you cannot assert that. It launches a coroutine that fails, but it doesn't fail itselfkoufa
04/05/2023, 9:24 PMapplicationScope will not propagate the exception ?Joffrey
04/05/2023, 9:31 PMtest3() fails, that's all I meant. The exception will not bubble up the call stack of test3(), it will bubble up the call stack of the dispatcher of the applicationScope, which is independent from the stack of test3.mkrussel
04/05/2023, 9:32 PMkoufa
04/05/2023, 9:39 PM