ATHARV YADAV
04/07/2026, 5:20 PM@OptIn(ExperimentalCoroutinesApi::class)
class MainDispatcherRule( val testDispatcher: TestDispatcher = StandardTestDispatcher() ) : TestWatcher() {
override fun starting(description: Description) { Dispatchers.setMain(testDispatcher) }
override fun finished(description: Description) { Dispatchers.resetMain() }
}Alexandru Caraus
04/07/2026, 6:07 PMATHARV YADAV
04/08/2026, 2:53 PM