You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in munit.ScalaCheckEffectSuite
we provide a ValueTransform for a PropF, where we call "check" it with scalacheckTestParameters (which can be overriden for a whole suite). However, let's consider overriding said parameters for a specific PropF:
test("foo") {
forAllF { (a: Int) =>// some testing returning an F[Unit]
}.check(Parameters.default.withMinSuccessfulTests(2)) // returns F[Test.Result]
}
This test will run and pass since munit will fail a test only if an Exception is thrown. Since the only ValueTransform defined in munit.ScalaCheckEffectSuite is defined for PropF[F], it won't be used, and instead the CatsEffectSuite value transform will be triggered, converting the F[Test.Result] into a Future[Test.Result] which can be understood by Munit. Still, since no exceptions are raised, the test will then be a pass.
There should be support for providing custom Parameters to a PropF.
The text was updated successfully, but these errors were encountered:
manuelcueto
changed the title
Munit Props with custom TestParameters throw False Positive
[Munit] PropF with custom TestParameters yields a False Positive
Apr 4, 2022
in
munit.ScalaCheckEffectSuite
we provide a ValueTransform for a PropF, where we call "check" it with
scalacheckTestParameters
(which can be overriden for a whole suite). However, let's consider overriding said parameters for a specific PropF:This test will run and pass since munit will fail a test only if an Exception is thrown. Since the only ValueTransform defined in
munit.ScalaCheckEffectSuite
is defined for PropF[F], it won't be used, and instead the CatsEffectSuite value transform will be triggered, converting the F[Test.Result] into a Future[Test.Result] which can be understood by Munit. Still, since no exceptions are raised, the test will then be a pass.There should be support for providing custom
Parameters
to a PropF.The text was updated successfully, but these errors were encountered: