munit-cats-effect
munit-cats-effect copied to clipboard
Stack traces do not start in test method
//> using dep org.scalameta::munit::1.1.0
//> using dep org.typelevel::munit-cats-effect::2.1.0
import cats.effect.IO
import munit.CatsEffectSuite
object Service {
def op(): IO[String] = IO.delay(throw new Error("expected"))
}
class ServiceSpec extends CatsEffectSuite {
test("call directly") {
Service.op()
}
}
% scala-cli test ServiceTest.scala
Compiling project (Scala 3.6.4, JVM (17))
Compiled project (Scala 3.6.4, JVM (17))
ServiceSpec:
==> X ServiceSpec.call directly 0.062s java.lang.Error: expected
at Service$.op$$anonfun$1(ServiceTest.scala:8)
at delay @ Service$.op(ServiceTest.scala:8)
at flatMap @ munit.internal.NestingChecks$.checkNestingIO(internal.scala:38)
In practice it's not possible to navigate to failing test from stack trace.
Hi,I hope you’re well. I’ve reviewed this issue and would like to request assignment. I’m ready to contribute and will follow the project’s guidelines and standards. Could you please assign this issue to me?
Thanks for your consideration. 🙏 @mwisnicki