4

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.

pme
  • 14,156
  • 3
  • 52
  • 95

1 Answers1

7

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

test("A test that would otherwise fail") {
  assert(true, isFalse)
} @@ ignore
Adam Fraser
  • 809
  • 5
  • 4