Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore a Suite or a Test in ZIO Test?

I could not find anything on how to ignore a Suite or a Test with ZIO Test.

Whether in an example nor in the documentation (https://zio.dev/docs/usecases/usecases_testing)

There is an ignored in the test package object:

  /**
   * Creates an ignored test result.
   */
  final val ignored: ZTest[Any, Nothing, Nothing] =
    ZIO.succeed(TestSuccess.Ignored)

But how can it be used in your code?

I tried different things, but with no success.

like image 638
pme Avatar asked Oct 23 '25 18:10

pme


1 Answers

The best way to ignore a test is using TestAspect.ignore. For example:

test("A test that would otherwise fail") {
  assert(true, isFalse)
} @@ ignore
like image 75
Adam Fraser Avatar answered Oct 26 '25 12:10

Adam Fraser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!