File tree Expand file tree Collapse file tree
maps-app/src/test/java/com/google/maps/android/compose/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ import io.mockk.every
2323import io.mockk.mockk
2424import io.mockk.mockkStatic
2525import io.mockk.verify
26+ import kotlinx.coroutines.Dispatchers
2627import kotlinx.coroutines.ExperimentalCoroutinesApi
2728import kotlinx.coroutines.launch
2829import kotlinx.coroutines.test.TestDispatcher
2930import kotlinx.coroutines.test.UnconfinedTestDispatcher
3031import kotlinx.coroutines.test.runTest
32+ import kotlinx.coroutines.test.setMain
3133import org.junit.Assert.assertEquals
3234import org.junit.Before
3335import org.junit.Test
@@ -51,6 +53,7 @@ class GoogleMapsInitializerTest {
5153 every { MapsApiSettings .addInternalUsageAttributionId(any(), any()) } returns Unit
5254
5355 testDispatcher = UnconfinedTestDispatcher ()
56+ Dispatchers .setMain(testDispatcher)
5457 googleMapsInitializer = DefaultGoogleMapsInitializer (testDispatcher)
5558 }
5659
You can’t perform that action at this time.
0 commit comments