pme
pme

Reputation: 14803

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.

Upvotes: 4

Views: 1190

Answers (1)

Adam Fraser
Adam Fraser

Reputation: 849

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

test("A test that would otherwise fail") {
  assert(true, isFalse)
} @@ ignore

Upvotes: 8

Related Questions