diff --git a/build.sbt b/build.sbt index bf1bb9b..c6ba41d 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ name := "cats-effect-testing" -ThisBuild / baseVersion := "1.3" +ThisBuild / baseVersion := "1.4" ThisBuild / strictSemVer := true ThisBuild / organization := "org.typelevel" @@ -42,7 +42,7 @@ ThisBuild / scmInfo := Some( url("https://github.com/djspiewak/cats-effect-testing"), "git@github.com:djspiewak/cats-effect-testing.git")) -val CatsEffectVersion = "3.2.9" +val CatsEffectVersion = "3.3.0" lazy val root = project .in(file(".")) @@ -76,7 +76,9 @@ lazy val specs2 = crossProject(JSPlatform, JVMPlatform) .dependsOn(core) .settings( name := "cats-effect-testing-specs2", - libraryDependencies += ("org.specs2" %%% "specs2-core" % "4.13.1").cross(CrossVersion.for3Use2_13)) + libraryDependencies += ("org.specs2" %%% "specs2-core" % "4.13.1") + .cross(CrossVersion.for3Use2_13) + .exclude("org.scala-js", "scala-js-macrotask-executor_sjs1_2.13")) lazy val scalatest = crossProject(JSPlatform, JVMPlatform) .in(file("scalatest")) @@ -97,7 +99,9 @@ lazy val utest = crossProject(JSPlatform, JVMPlatform) libraryDependencies ++= Seq( "org.typelevel" %%% "cats-effect-testkit" % CatsEffectVersion, - "com.lihaoyi" %%% "utest" % "0.7.10")) + "com.lihaoyi" %%% "utest" % "0.7.10"), + + Test / scalacOptions -= "-Xfatal-warnings") lazy val minitest = crossProject(JSPlatform, JVMPlatform) .in(file("minitest")) @@ -108,4 +112,6 @@ lazy val minitest = crossProject(JSPlatform, JVMPlatform) libraryDependencies ++= Seq( "org.typelevel" %%% "cats-effect-testkit" % CatsEffectVersion, - "io.monix" %%% "minitest" % "2.9.6")) + "io.monix" %%% "minitest" % "2.9.6"), + + Test / scalacOptions -= "-Xfatal-warnings") diff --git a/minitest/shared/src/main/scala/cats/effect/testing/minitest/DeterministicIOTestSuite.scala b/minitest/shared/src/main/scala/cats/effect/testing/minitest/DeterministicIOTestSuite.scala index da9b486..b26a7af 100644 --- a/minitest/shared/src/main/scala/cats/effect/testing/minitest/DeterministicIOTestSuite.scala +++ b/minitest/shared/src/main/scala/cats/effect/testing/minitest/DeterministicIOTestSuite.scala @@ -25,6 +25,7 @@ import minitest.api.{DefaultExecutionContext, TestSpec} import scala.concurrent.duration._ +@deprecated("use TestControl from cats-effect-testkit", "1.4.0") abstract class DeterministicIOTestSuite extends BaseIOTestSuite[TestContext] { override protected final def makeExecutionContext(): TestContext = TestContext() @@ -48,7 +49,7 @@ abstract class DeterministicIOTestSuite extends BaseIOTestSuite[TestContext] { unsafe.IORuntime(ec, ec, scheduler, () => (), unsafe.IORuntimeConfig()) val f = io.unsafeToFuture() - ec.tick(365.days) + ec.tickAll() f.value match { case Some(value) => value.get case None => throw new RuntimeException( diff --git a/utest/shared/src/main/scala/cats/effect/testing/utest/DeterministicIOTestSuite.scala b/utest/shared/src/main/scala/cats/effect/testing/utest/DeterministicIOTestSuite.scala index 3d5fcbd..8972e77 100644 --- a/utest/shared/src/main/scala/cats/effect/testing/utest/DeterministicIOTestSuite.scala +++ b/utest/shared/src/main/scala/cats/effect/testing/utest/DeterministicIOTestSuite.scala @@ -24,6 +24,7 @@ import utest.TestSuite import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration._ +@deprecated("use TestControl from cats-effect-testkit", "1.4.0") abstract class DeterministicIOTestSuite extends TestSuite { protected val testContext: TestContext = TestContext() protected def allowNonIOTests: Boolean = false @@ -46,7 +47,7 @@ abstract class DeterministicIOTestSuite extends TestSuite { runBody.flatMap { case io: IO[Any] => val f = io.unsafeToFuture() - testContext.tickAll(365.days) + testContext.tickAll() assert(testContext.state.tasks.isEmpty) f.value match { case Some(_) => f