Vladislav Shipugin
03/10/2021, 1:49 PMtestScheduler
and it has triggerActions()
. Is there any analogue in coroutines?
I’m looking for an analogue in runBlockingTest, but this has an experimental API.Olivier Patry
03/10/2021, 1:56 PMTestCoroutineDispatcher
is what you are looking for?
see https://developer.android.com/kotlin/coroutines/coroutines-best-practices#test-coroutine-dispatcherOlivier Patry
03/10/2021, 1:57 PMVladislav Shipugin
03/10/2021, 2:02 PMOlivier Patry
03/10/2021, 2:03 PMDispatchers.Unconfined
to execute coroutines sequentially, removing asynchronicityOlivier Patry
03/10/2021, 2:04 PMOlivier Patry
03/10/2021, 2:04 PMVladislav Shipugin
03/10/2021, 2:26 PMVladislav Shipugin
03/11/2021, 8:56 AM