Pablo
10/01/2020, 7:21 AMTestCoroutineScope.runBlockingTest{}
And
TestCoroutineDispatcher.runBlockingTest{}
I see some people use them, and others just put runBlockingText{}
without any dispatcher nor coroutineScope, is there any difference?gildor
10/01/2020, 7:30 AMgildor
10/01/2020, 7:30 AMgildor
10/01/2020, 7:30 AMPablo
10/01/2020, 7:35 AMrunBlockingTest {
my test here
}
gildor
10/01/2020, 7:38 AMgildor
10/01/2020, 7:39 AMgildor
10/01/2020, 7:41 AMthe exceptions wouldn’t be caughtno, it’s just records all uncaught exceptions and print stacktrace, just gives a bit more info on crash
gildor
10/01/2020, 7:43 AMgildor
10/01/2020, 7:44 AMPablo
10/01/2020, 8:08 AMPablo
10/01/2020, 8:09 AMrunBlockingTest
creates everything for you, but I guess they did it like this to ensure, it was running on a TestDispatcher 🤷gildor
10/01/2020, 8:24 AMrunBlockingTest
always run on TestDispatchter until you override it