Skip to content

Commit 8463ae0

Browse files
committed
Upgrade to munit 1.0.0-M6
1 parent bfaee41 commit 8463ae0

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ lazy val munit = crossProject(JSPlatform, JVMPlatform)
2828
.dependsOn(core)
2929
.settings(
3030
libraryDependencies ++= List(
31-
"org.scalameta" %%% "munit-scalacheck" % "1.0.0-M5",
31+
"org.scalameta" %%% "munit-scalacheck" % "1.0.0-M6",
3232
"org.typelevel" %%% "cats-effect" % "3.3.11" % Test
3333
)
3434
)

munit/shared/src/main/scala/munit/ScalaCheckEffectSuite.scala

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ import org.scalacheck.effect.PropF
2323
import org.scalacheck.rng.Seed
2424
import org.scalacheck.util.Pretty
2525

26-
import scala.annotation.tailrec
27-
import scala.concurrent.ExecutionException
28-
2926
/** Extends `ScalaCheckSuite`, adding support for evaluation of effectful properties (`PropF[F]`
3027
* values).
3128
*
@@ -87,20 +84,11 @@ trait ScalaCheckEffectSuite extends ScalaCheckSuite {
8784
private def fixResultException(result: ScalaCheckTest.Result): ScalaCheckTest.Result =
8885
result.copy(
8986
status = result.status match {
90-
case p @ PropException(_, e, _) => p.copy(e = rootCause(e))
87+
case p @ PropException(_, e, _) => p.copy(e = Exceptions.rootCause(e))
9188
case default => default
9289
}
9390
)
9491

95-
// https://github.com/scalameta/munit/blob/68c2d13868baec9a77384f11f97505ecc0ce3eba/munit/shared/src/main/scala/munit/MUnitRunner.scala#L318-L326
96-
@tailrec
97-
private def rootCause(x: Throwable): Throwable = x match {
98-
// should also include InvocationTargetException and UndeclaredThrowableException, but not on SJS
99-
case _: ExceptionInInitializerError | _: ExecutionException if x.getCause != null =>
100-
rootCause(x.getCause)
101-
case _ => x
102-
}
103-
10492
}
10593

10694
object ScalaCheckEffectSuite {}

0 commit comments

Comments
 (0)