audriusk
@Test fun someTest() = runBlockingTest { Dispatchers.setMain(coroutineContext[ContinuationInterceptor] as CoroutineDispatcher) val viewModel = arrange() viewModel.viewModelScope.launch { throw IllegalStateException("mm") } }
viewModelScope
SupervisorJob
tseisel
coroutineContext[ContinuationInterceptor] as CoroutineDispatcher
runBlockingTest
TestCoroutineDispatcher
aipok
CoroutineContext
A modern programming language that makes developers happier.