Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

name := "cats-effect-testing"

ThisBuild / baseVersion := "1.3"
ThisBuild / baseVersion := "1.4"
ThisBuild / strictSemVer := true

ThisBuild / organization := "org.typelevel"
Expand All @@ -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("."))
Expand Down Expand Up @@ -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"))
Expand All @@ -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"))
Expand All @@ -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")
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down