diff --git a/app/build.gradle b/app/build.gradle index 77c47fe0b..135863562 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -170,7 +170,7 @@ ext { room = "2.4.0" chucker = "3.5.2" mockk = "1.12.1" - coroutines = "1.5.2" + coroutines = "1.6.0" } dependencies { diff --git a/app/src/test/java/io/github/wulkanowy/utils/FlowUtilsKtTest.kt b/app/src/test/java/io/github/wulkanowy/utils/FlowUtilsKtTest.kt index 375a24038..57045a29d 100644 --- a/app/src/test/java/io/github/wulkanowy/utils/FlowUtilsKtTest.kt +++ b/app/src/test/java/io/github/wulkanowy/utils/FlowUtilsKtTest.kt @@ -1,23 +1,21 @@ package io.github.wulkanowy.utils -import io.mockk.Runs -import io.mockk.coEvery -import io.mockk.coVerifyOrder -import io.mockk.just -import io.mockk.mockk +import io.mockk.* import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.sync.Mutex -import kotlinx.coroutines.test.TestCoroutineScope +import kotlinx.coroutines.test.TestScope +import kotlinx.coroutines.test.UnconfinedTestDispatcher +import kotlinx.coroutines.test.advanceTimeBy import org.junit.Test import kotlin.test.assertEquals @OptIn(ExperimentalCoroutinesApi::class) class FlowUtilsKtTest { - private val testScope = TestCoroutineScope() + private val testScope = TestScope(UnconfinedTestDispatcher()) @Test fun `fetch from two places with same remote data`() {