Package

zio

test

Permalink

package test

_ZIO Test_ is a featherweight testing library for effectful programs.

The library imagines every spec as an ordinary immutable value, providing tremendous potential for composition. Thanks to tight integration with ZIO, specs can use resources (including those requiring disposal), have well- defined linear and parallel semantics, and can benefit from a host of ZIO combinators.

import zio.test._
import zio.Clock.nanoTime
import Assertion.isGreaterThan

object MyTest extends DefaultRunnableSpec {
  def spec = suite("clock")(
    test("time is non-zero") {
      for {
        time <- Live.live(nanoTime)
      } yield assertTrue(time >= 0)
    }
  )
}
Linear Supertypes
CompileVariants, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. test
  2. CompileVariants
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractRunnableSpec extends AnyRef

    Permalink
    Annotations
    @EnableReflectiveInstantiation()
  2. type Annotated[+A] = (A, TestAnnotationMap)

    Permalink

    An Annotated[A] contains a value of type A along with zero or more test annotations.

  3. trait Annotations extends Serializable

    Permalink

    The Annotations trait provides access to an annotation map that tests can add arbitrary annotations to.

    The Annotations trait provides access to an annotation map that tests can add arbitrary annotations to. Each annotation consists of a string identifier, an initial value, and a function for combining two values. Annotations form monoids and you can think of Annotations as a more structured logging service or as a super polymorphic version of the writer monad effect.

  4. case class Assert(arrow: TestArrow[Any, Boolean]) extends Product with Serializable

    Permalink
  5. type AssertResult = BoolAlgebra[AssertionValue]

    Permalink
  6. type AssertResultM = BoolAlgebraM[Any, Nothing, AssertionValue]

    Permalink
  7. final class Assertion[-A] extends AssertionM[A] with (⇒ A) ⇒ AssertResult

    Permalink

    An Assertion[A] is capable of producing assertion results on an A.

    An Assertion[A] is capable of producing assertion results on an A. As a proposition, assertions compose using logical conjunction and disjunction, and can be negated.

  8. sealed abstract class AssertionData extends AnyRef

    Permalink
  9. abstract class AssertionM[-A] extends AnyRef

    Permalink

    An AssertionM[A] is capable of producing assertion results on an A.

    An AssertionM[A] is capable of producing assertion results on an A. As a proposition, assertions compose using logical conjunction and disjunction, and can be negated.

  10. sealed abstract class AssertionMData extends AnyRef

    Permalink
  11. sealed trait AssertionResult extends AnyRef

    Permalink
  12. sealed abstract class AssertionValue extends AnyRef

    Permalink

    An AssertionValue keeps track of a assertion and a value, existentially hiding the type.

    An AssertionValue keeps track of a assertion and a value, existentially hiding the type. This is used internally by the library to provide useful error messages in the event of test failures.

  13. trait AssertionVariants extends AnyRef

    Permalink
  14. sealed abstract class BoolAlgebra[+A] extends Product with Serializable

    Permalink

    A BoolAlgebra[A] is a description of logical operations on values of type A.

  15. final case class BoolAlgebraM[-R, +E, +A](run: ZIO[R, E, BoolAlgebra[A]]) extends Product with Serializable

    Permalink
  16. trait CheckConstructor[Environment, In] extends AnyRef

    Permalink
  17. trait CheckConstructorLowPriority1 extends CheckConstructorLowPriority2

    Permalink
  18. trait CheckConstructorLowPriority2 extends CheckConstructorLowPriority3

    Permalink
  19. trait CheckConstructorLowPriority3 extends CheckConstructorLowPriority4

    Permalink
  20. trait CheckConstructorLowPriority4 extends CheckConstructorLowPriority5

    Permalink
  21. trait CheckConstructorLowPriority5 extends AnyRef

    Permalink
  22. trait CompileVariants extends AnyRef

    Permalink
  23. final class CustomAssertion[A, B] extends AnyRef

    Permalink

    CustomAssertion allows users to create their own custom assertions for use in assertTrue.

    CustomAssertion allows users to create their own custom assertions for use in assertTrue. They are constructed with CustomAssertion.make.

    // Definition
    sealed trait Pet
    case class Dog(hasBone: Boolean) extends Pet
    case class Fish(bubbles: Double) extends Pet
    case class Cat(livesRemaining: Int) extends Color
    
    val lives =
      CustomAssertion.make[Pet] {
        case Cat(livesRemaining) => Right(livesRemaining)
        case other => Left(s"Expected $$other to be Cat")
      }
    
    // Usage
    suite("custom assertions")(
      test("as even") {
        val pet: Option[Pet] = Some(Cat(8))
        assertTrue(pet.is(_.some.custom(lives)) == 8)
      }
    )
  24. abstract class DefaultRunnableSpec extends RunnableSpec[TestEnvironment, Any]

    Permalink

    A default runnable spec that provides testable versions of all of the modules in ZIO (Clock, Random, etc).

  25. sealed abstract class Eql[A, B] extends AnyRef

    Permalink

    A value of type Eql[A, B] provides implicit evidence that two values with types A and B could potentially be equal, that is, that A is a subtype of B or B is a subtype of A.

    A value of type Eql[A, B] provides implicit evidence that two values with types A and B could potentially be equal, that is, that A is a subtype of B or B is a subtype of A.

    Annotations
    @implicitNotFound( ... )
  26. sealed trait ErrorMessage extends AnyRef

    Permalink
  27. final case class ExecutedSpec[+E](caseValue: SpecCase[E, ExecutedSpec[E]]) extends Product with Serializable

    Permalink

    An ExecutedSpec is a spec that has been run to produce test results.

  28. case class FailureCase(errorMessage: Message, codeString: String, location: String, path: Chunk[(String, Any)], span: Span, nestedFailures: Chunk[FailureCase], result: Any) extends Product with Serializable

    Permalink
  29. final case class FailureDetails(assertion: ::[AssertionValue]) extends Product with Serializable

    Permalink

    FailureDetails keeps track of details relevant to failures.

  30. trait FunctionVariants extends AnyRef

    Permalink
  31. final case class Gen[-R, +A](sample: ZStream[R, Nothing, Option[Sample[R, A]]]) extends Product with Serializable

    Permalink

    A Gen[R, A] represents a generator of values of type A, which requires an environment R.

    A Gen[R, A] represents a generator of values of type A, which requires an environment R. Generators may be random or deterministic.

  32. sealed abstract class GenFailureDetails extends AnyRef

    Permalink

    GenFailureDetails keeps track of relevant information related to a failure in a generative test.

  33. trait GenZIO extends AnyRef

    Permalink
  34. trait Live extends AnyRef

    Permalink

    The Live trait provides access to the "live" environment from within the test environment for effects such as printing test results to the console or timing out tests where it is necessary to access the real environment.

    The Live trait provides access to the "live" environment from within the test environment for effects such as printing test results to the console or timing out tests where it is necessary to access the real environment.

    The easiest way to access the "live" environment is to use the live method with an effect that would otherwise access the test environment.

    import zio.Clock
    import zio.test._
    
    val realTime = live(Clock.nanoTime)

    The withLive method can be used to apply a transformation to an effect with the live environment while ensuring that the effect itself still runs with the test environment, for example to time out a test. Both of these methods are re-exported in the environment package for easy availability.

  35. trait PrettyPrintVersionSpecific extends AnyRef

    Permalink
  36. trait Restorable extends Serializable

    Permalink
  37. sealed trait Result[+A] extends AnyRef

    Permalink
  38. abstract class RunnableSpec[R, E] extends AbstractRunnableSpec

    Permalink

    A RunnableSpec has a main function and can be run by the JVM / Scala.js.

  39. final case class Sample[-R, +A](value: A, shrink: ZStream[R, Nothing, Option[Sample[R, A]]]) extends Product with Serializable

    Permalink

    A sample is a single observation from a random variable, together with a tree of "shrinkings" used for minimization of "large" failures.

  40. trait Sized extends Serializable

    Permalink
  41. class SmartAssertMacros extends AnyRef

    Permalink
  42. implicit final class SmartAssertionOps[A] extends AnyVal

    Permalink
  43. final case class Spec[-R, +E, +T](caseValue: SpecCase[R, E, T, Spec[R, E, T]]) extends SpecVersionSpecific[R, E, T] with Product with Serializable

    Permalink

    A Spec[R, E, T] is the backbone of _ZIO Test_.

    A Spec[R, E, T] is the backbone of _ZIO Test_. Every spec is either a suite, which contains other specs, or a test of type T. All specs require an environment of type R and may potentially fail with an error of type E.

  44. class SpecLayerMacros extends LayerMacroUtils

    Permalink
  45. trait SuiteConstructor[In] extends AnyRef

    Permalink
  46. trait SuiteConstructorLowPriority1 extends SuiteConstructorLowPriority2

    Permalink
  47. trait SuiteConstructorLowPriority2 extends SuiteConstructorLowPriority3

    Permalink
  48. trait SuiteConstructorLowPriority3 extends SuiteConstructorLowPriority4

    Permalink
  49. trait SuiteConstructorLowPriority4 extends AnyRef

    Permalink
  50. final case class Summary(success: Int, fail: Int, ignore: Int, summary: String) extends Product with Serializable

    Permalink
  51. final class TestAnnotation[V] extends Serializable

    Permalink

    A type of annotation.

  52. final class TestAnnotationMap extends AnyRef

    Permalink

    An annotation map keeps track of annotations of different types.

  53. sealed abstract class TestAnnotationRenderer extends AnyRef

    Permalink

    A TestAnnotationRenderer knows how to render test annotations.

  54. final case class TestArgs(testSearchTerms: List[String], tagSearchTerms: List[String], testTaskPolicy: Option[String], testRenderer: Option[String], printSummary: Boolean) extends Product with Serializable

    Permalink
  55. sealed trait TestArrow[-A, +B] extends AnyRef

    Permalink
  56. abstract class TestAspect[+LowerR, -UpperR, +LowerE, -UpperE] extends AnyRef

    Permalink

    A TestAspect is an aspect that can be weaved into specs.

    A TestAspect is an aspect that can be weaved into specs. You can think of an aspect as a polymorphic function, capable of transforming one test into another, possibly enlarging the environment or error type.

  57. type TestAspectAtLeastR[-R] = TestAspect[Nothing, R, Nothing, Any]

    Permalink

    A TestAspectAtLeast[R] is a TestAspect that requires at least an R in its environment.

  58. type TestAspectPoly = TestAspect[Nothing, Any, Nothing, Any]

    Permalink

    A TestAspectPoly is a TestAspect that is completely polymorphic, having no requirements on error or environment.

  59. trait TestClock extends Clock with Restorable

    Permalink

    TestClock makes it easy to deterministically and efficiently test effects involving the passage of time.

    TestClock makes it easy to deterministically and efficiently test effects involving the passage of time.

    Instead of waiting for actual time to pass, sleep and methods implemented in terms of it schedule effects to take place at a given clock time. Users can adjust the clock time using the adjust and setTime methods, and all effects scheduled to take place on or before that time will automatically be run in order.

    For example, here is how we can test ZIO#timeout using TestClock:

    import zio.ZIO
    import zio.test.TestClock
    
    for {
      fiber  <- ZIO.sleep(5.minutes).timeout(1.minute).fork
      _      <- TestClock.adjust(1.minute)
      result <- fiber.join
    } yield result == None

    Note how we forked the fiber that sleep was invoked on. Calls to sleep and methods derived from it will semantically block until the time is set to on or after the time they are scheduled to run. If we didn't fork the fiber on which we called sleep we would never get to set the time on the line below. Thus, a useful pattern when using TestClock is to fork the effect being tested, then adjust the clock time, and finally verify that the expected effects have been performed.

    For example, here is how we can test an effect that recurs with a fixed delay:

    import zio.Queue
    import zio.test.TestClock
    
    for {
      q <- Queue.unbounded[Unit]
      _ <- q.offer(()).delay(60.minutes).forever.fork
      a <- q.poll.map(_.isEmpty)
      _ <- TestClock.adjust(60.minutes)
      b <- q.take.as(true)
      c <- q.poll.map(_.isEmpty)
      _ <- TestClock.adjust(60.minutes)
      d <- q.take.as(true)
      e <- q.poll.map(_.isEmpty)
    } yield a && b && c && d && e

    Here we verify that no effect is performed before the recurrence period, that an effect is performed after the recurrence period, and that the effect is performed exactly once. The key thing to note here is that after each recurrence the next recurrence is scheduled to occur at the appropriate time in the future, so when we adjust the clock by 60 minutes exactly one value is placed in the queue, and when we adjust the clock by another 60 minutes exactly one more value is placed in the queue.

  60. trait TestClockPlatformSpecific extends AnyRef

    Permalink
  61. trait TestConfig extends Serializable

    Permalink

    The TestConfig service provides access to default configuration settings used by ZIO Test, including the number of times to repeat tests to ensure they are stable, the number of times to retry flaky tests, the sufficient number of samples to check from a random variable, and the maximum number of shrinkings to minimize large failures.

  62. trait TestConsole extends Console with Restorable

    Permalink

    TestConsole provides a testable interface for programs interacting with the console by modeling input and output as reading from and writing to input and output buffers maintained by TestConsole and backed by a Ref.

    TestConsole provides a testable interface for programs interacting with the console by modeling input and output as reading from and writing to input and output buffers maintained by TestConsole and backed by a Ref.

    All calls to print and printLine using the TestConsole will write the string to the output buffer and all calls to readLine will take a string from the input buffer. To facilitate debugging, by default output will also be rendered to standard output. You can enable or disable this for a scope using debug, silent, or the corresponding test aspects.

    TestConsole has several methods to access and manipulate the content of these buffers including feedLines to feed strings to the input buffer that will then be returned by calls to readLine, output to get the content of the output buffer from calls to print and printLine, and clearInput and clearOutput to clear the respective buffers.

    Together, these functions make it easy to test programs interacting with the console.

    import zio.Console._
    import zio.test.TestConsole
    import zio.ZIO
    
    val sayHello = for {
      name <- readLine
      _    <- printLine("Hello, " + name + "!")
    } yield ()
    
    for {
      _ <- TestConsole.feedLines("John", "Jane", "Sally")
      _ <- ZIO.collectAll(List.fill(3)(sayHello))
      result <- TestConsole.output
    } yield result == Vector("Hello, John!\n", "Hello, Jane!\n", "Hello, Sally!\n")
  63. trait TestConstructor[-Environment, In] extends AnyRef

    Permalink
  64. trait TestConstructorLowPriority1 extends TestConstructorLowPriority2

    Permalink
  65. trait TestConstructorLowPriority2 extends TestConstructorLowPriority3

    Permalink
  66. trait TestConstructorLowPriority3 extends TestConstructorLowPriority4

    Permalink
  67. trait TestConstructorLowPriority4 extends TestConstructorLowPriority5

    Permalink
  68. trait TestConstructorLowPriority5 extends AnyRef

    Permalink
  69. sealed trait TestDuration extends AnyRef

    Permalink
  70. type TestEnvironment = Annotations with Live with Sized with TestClock with TestConfig with TestConsole with TestRandom with TestSystem

    Permalink
  71. abstract class TestExecutor[+R, E] extends AnyRef

    Permalink

    A TestExecutor[R, E] is capable of executing specs that require an environment R and may fail with an E.

  72. sealed abstract class TestFailure[+E] extends AnyRef

    Permalink
  73. final case class TestLens[+A]() extends Product with Serializable

    Permalink
  74. implicit final class TestLensAnyOps[A] extends AnyVal

    Permalink
  75. implicit final class TestLensCauseOps[E] extends AnyVal

    Permalink
  76. implicit final class TestLensEitherOps[E, A] extends AnyVal

    Permalink
  77. implicit final class TestLensExitOps[E, A] extends AnyVal

    Permalink
  78. implicit final class TestLensOptionOps[A] extends AnyVal

    Permalink
  79. trait TestLogger extends Serializable

    Permalink
  80. trait TestRandom extends Random with Restorable

    Permalink

    TestRandom allows for deterministically testing effects involving randomness.

    TestRandom allows for deterministically testing effects involving randomness.

    TestRandom operates in two modes. In the first mode, TestRandom is a purely functional pseudo-random number generator. It will generate pseudo-random values just like scala.util.Random except that no internal state is mutated. Instead, methods like nextInt describe state transitions from one random state to another that are automatically composed together through methods like flatMap. The random seed can be set using setSeed and TestRandom is guaranteed to return the same sequence of values for any given seed. This is useful for deterministically generating a sequence of pseudo-random values and powers the property based testing functionality in ZIO Test.

    In the second mode, TestRandom maintains an internal buffer of values that can be "fed" with methods such as feedInts and then when random values of that type are generated they will first be taken from the buffer. This is useful for verifying that functions produce the expected output for a given sequence of "random" inputs.

    import zio.Random
    import zio.test.TestRandom
    
    for {
      _ <- TestRandom.feedInts(4, 5, 2)
      x <- Random.nextIntBounded(6)
      y <- Random.nextIntBounded(6)
      z <- Random.nextIntBounded(6)
    } yield x + y + z == 11

    TestRandom will automatically take values from the buffer if a value of the appropriate type is available and otherwise generate a pseudo-random value, so there is nothing you need to do to switch between the two modes. Just generate random values as you normally would to get pseudo-random values, or feed in values of your own to get those values back. You can also use methods like clearInts to clear the buffer of values of a given type so you can fill the buffer with new values or go back to pseudo-random number generation.

  81. type TestReporter[-E] = (zio.Duration, ExecutedSpec[E]) ⇒ URIO[TestLogger, Unit]

    Permalink

    A TestReporter[E] is capable of reporting test results with error type E.

  82. type TestResult = BoolAlgebra[AssertionResult]

    Permalink
  83. final case class TestRunner[R, E](executor: TestExecutor[R, E], runtimeConfig: RuntimeConfig = RuntimeConfig.makeDefault(), reporter: TestReporter[E] = ..., bootstrap: Layer[Nothing, TestLogger with Clock] = ...) extends Product with Serializable

    Permalink

    A TestRunner[R, E] encapsulates all the logic necessary to run specs that require an environment R and may fail with an error E.

    A TestRunner[R, E] encapsulates all the logic necessary to run specs that require an environment R and may fail with an error E. Test runners require a test executor, a runtime configuration, and a reporter.

  84. sealed abstract class TestSuccess extends AnyRef

    Permalink
  85. trait TestSystem extends System with Restorable

    Permalink

    TestSystem supports deterministic testing of effects involving system properties.

    TestSystem supports deterministic testing of effects involving system properties. Internally, TestSystem maintains mappings of environment variables and system properties that can be set and accessed. No actual environment variables or system properties will be accessed or set as a result of these actions.

    import zio.system
    import zio.test.TestSystem
    
    for {
      _      <- TestSystem.putProperty("java.vm.name", "VM")
      result <- system.property("java.vm.name")
    } yield result == Some("VM")
  86. final case class TestTimeoutException(message: String) extends Throwable with Product with Serializable

    Permalink
  87. trait TimeVariants extends AnyRef

    Permalink
  88. trait TimeoutVariants extends AnyRef

    Permalink
  89. sealed trait Trace[+A] extends AnyRef

    Permalink
  90. abstract class ZIOSpec[R] extends ZIOSpecAbstract

    Permalink
  91. abstract class ZIOSpecAbstract extends ZIOApp

    Permalink
    Annotations
    @EnableReflectiveInstantiation()
  92. abstract class ZIOSpecDefault extends ZIOSpec[TestEnvironment]

    Permalink
  93. type ZSpec[-R, +E] = Spec[R, TestFailure[E], TestSuccess]

    Permalink

    A ZSpec[R, E] is the canonical spec for testing ZIO programs.

    A ZSpec[R, E] is the canonical spec for testing ZIO programs. The spec's test type is a ZIO effect that requires an R and might fail with an E.

  94. type ZTest[-R, +E] = ZIO[R, TestFailure[E], TestSuccess]

    Permalink

    A ZTest[R, E] is an effectfully produced test that requires an R and may fail with an E.

  95. type ZTestEnv = TestClock with TestConsole with TestRandom with TestSystem

    Permalink

    A ZRTestEnv is an alias for all ZIO provided Restorable TestEnvironment objects

  96. sealed trait ZTestLogger[-Message, +Output] extends ZLogger[Message, Output]

    Permalink

    A ZTestLogger is an implementation of a ZLogger that writes all log messages to an internal data structure.

    A ZTestLogger is an implementation of a ZLogger that writes all log messages to an internal data structure. The contents of this data structure can be accessed using the logOutput operator. This makes it easy to write tests to verify that expected messages are being logged.

    test("logging works") {
      for {
        _      <- ZIO.logDebug("It's alive!")
        output <- ZTestLogger.logOutput
      } yield assertTrue(output.length == 1) &&
        assertTrue(output(0).message() == "It's alive!") &&
        assertTrue(output(0).logLevel == LogLevel.Debug)
    }
  97. class DefaultMutableRunnableSpec extends MutableRunnableSpec[Any]

    Permalink

    Syntax for writing test like

    Syntax for writing test like

    object MySpec extends DefaultMutableRunnableSpec {
      suite("foo") {
        test("name") {
        } @@ ignore
    
        test("name 2")
      }
      suite("another suite") {
        test("name 3")
      }
    }
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use DefaultRunnableSpec

  98. class MutableRunnableSpec[R] extends RunnableSpec[TestEnvironment, Any]

    Permalink

    Syntax for writing test like

    Syntax for writing test like

    object MySpec extends MutableRunnableSpec(layer, aspect) {
      suite("foo") {
        test("name") {
        } @@ ignore
    
        test("name 2")
      }
      suite("another suite") {
        test("name 3")
      }
    }
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use RunnableSpec

Value Members

  1. object Annotations extends Serializable

    Permalink
  2. object Assert extends Serializable

    Permalink
  3. object Assertion extends AssertionVariants

    Permalink
  4. object AssertionData

    Permalink
  5. object AssertionM

    Permalink
  6. object AssertionMData

    Permalink
  7. object AssertionResult

    Permalink
  8. object AssertionValue

    Permalink
  9. object BoolAlgebra extends Serializable

    Permalink
  10. object BoolAlgebraM extends Serializable

    Permalink
  11. object CheckConstructor extends CheckConstructorLowPriority1

    Permalink
  12. object CheckVariants

    Permalink
  13. object CompileVariants

    Permalink

    Proxy methods to call package private methods from the macro

  14. object CustomAssertion

    Permalink
  15. object DefaultTestReporter

    Permalink
  16. object Eql extends EqlLowPriority

    Permalink
  17. object ErrorMessage

    Permalink
  18. object ExecutedSpec extends Serializable

    Permalink
  19. object FailureCase extends Serializable

    Permalink
  20. object Gen extends GenZIO with FunctionVariants with TimeVariants with Serializable

    Permalink
  21. object GenFailureDetails

    Permalink
  22. object Live

    Permalink
  23. object Result

    Permalink
  24. object Sample extends Serializable

    Permalink
  25. object Sized extends Serializable

    Permalink
  26. object Spec extends Serializable

    Permalink
  27. object SuiteConstructor extends SuiteConstructorLowPriority1

    Permalink
  28. object SummaryBuilder

    Permalink
  29. object TestAnnotation extends Serializable

    Permalink
  30. object TestAnnotationMap

    Permalink
  31. object TestAnnotationRenderer

    Permalink
  32. object TestArgs extends Serializable

    Permalink
  33. object TestArrow

    Permalink
  34. object TestAspect extends TimeoutVariants

    Permalink
  35. object TestClock extends Serializable

    Permalink
  36. object TestConfig extends Serializable

    Permalink
  37. object TestConsole extends Serializable

    Permalink
  38. object TestConstructor extends TestConstructorLowPriority1

    Permalink
  39. object TestDuration

    Permalink
  40. object TestEnvironment extends Serializable

    Permalink
  41. object TestExecutor

    Permalink
  42. object TestFailure

    Permalink
  43. object TestLogger extends Serializable

    Permalink
  44. object TestPlatform

    Permalink

    TestPlatform provides information about the platform tests are being run on to enable platform specific test configuration.

  45. object TestRandom extends Serializable

    Permalink
  46. object TestReporter

    Permalink
  47. object TestResult extends Serializable

    Permalink
  48. object TestSuccess

    Permalink
  49. object TestSystem extends Serializable

    Permalink
  50. object TestVersion

    Permalink

    TestVersion provides information about the Scala version tests are being run on to enable platform specific test configuration.

  51. object Trace

    Permalink
  52. object ZTest extends Serializable

    Permalink
  53. object ZTestLogger

    Permalink
  54. macro def assert[A](expr: ⇒ A)(assertion: Assertion[A]): TestResult

    Permalink

    Checks the assertion holds for the given value.

    Checks the assertion holds for the given value.

    Definition Classes
    CompileVariants
  55. def assertCompletes(implicit trace: ZTraceElement): TestResult

    Permalink

    Asserts that the given test was completed.

  56. def assertCompletesM(implicit trace: ZTraceElement): UIO[TestResult]

    Permalink

    Asserts that the given test was completed.

  57. macro def assertM[R, E, A](effect: ZIO[R, E, A])(assertion: AssertionM[A]): ZIO[R, E, TestResult]

    Permalink

    Checks the assertion holds for the given effectfully-computed value.

    Checks the assertion holds for the given effectfully-computed value.

    Definition Classes
    CompileVariants
  58. def assertNever(message: String)(implicit trace: ZTraceElement): TestResult

    Permalink

    Asserts that the given test was never completed.

  59. macro def assertTrue(expr: Boolean): Assert

    Permalink
    Definition Classes
    CompileVariants
  60. macro def assertTrue(expr: Boolean, exprs: Boolean*): Assert

    Permalink

    Checks the assertion holds for the given value.

    Checks the assertion holds for the given value.

    Definition Classes
    CompileVariants
  61. def check[R <: TestConfig, A, B, C, D, F, G, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], rv6: Gen[R, G])(test: (A, B, C, D, F, G) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of check that accepts six random variables.

  62. def check[R <: TestConfig, A, B, C, D, F, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F])(test: (A, B, C, D, F) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of check that accepts five random variables.

  63. def check[R <: TestConfig, A, B, C, D, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D])(test: (A, B, C, D) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of check that accepts four random variables.

  64. def check[R <: TestConfig, A, B, C, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C])(test: (A, B, C) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of check that accepts three random variables.

  65. def check[R <: TestConfig, A, B, In](rv1: Gen[R, A], rv2: Gen[R, B])(test: (A, B) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of check that accepts two random variables.

  66. def check[R <: TestConfig, A, In](rv: Gen[R, A])(test: (A) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    Checks the test passes for "sufficient" numbers of samples from the given random variable.

  67. def checkAll[R <: TestConfig, A, B, C, D, F, G, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], rv6: Gen[R, G])(test: (A, B, C, D, F, G) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAll that accepts six random variables.

  68. def checkAll[R <: TestConfig, A, B, C, D, F, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F])(test: (A, B, C, D, F) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAll that accepts five random variables.

  69. def checkAll[R <: TestConfig, A, B, C, D, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D])(test: (A, B, C, D) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAll that accepts four random variables.

  70. def checkAll[R <: TestConfig, A, B, C, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C])(test: (A, B, C) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAll that accepts three random variables.

  71. def checkAll[R <: TestConfig, A, B, In](rv1: Gen[R, A], rv2: Gen[R, B])(test: (A, B) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAll that accepts two random variables.

  72. def checkAll[R <: TestConfig, A, In](rv: Gen[R, A])(test: (A) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    Checks the test passes for all values from the given random variable.

    Checks the test passes for all values from the given random variable. This is useful for deterministic Gen that comprehensively explore all possibilities in a given domain.

  73. def checkAllPar[R <: TestConfig, R1 <: R, E, A, B, C, D, F, G, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], rv6: Gen[R, G], parallelism: Int)(test: (A, B, C, D, F, G) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAllMPar that accepts six random variables.

  74. def checkAllPar[R <: TestConfig, R1 <: R, E, A, B, C, D, F, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], parallelism: Int)(test: (A, B, C, D, F) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAllMPar that accepts five random variables.

  75. def checkAllPar[R <: TestConfig, R1 <: R, E, A, B, C, D, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], parallelism: Int)(test: (A, B, C, D) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAllMPar that accepts four random variables.

  76. def checkAllPar[R <: TestConfig, R1 <: R, E, A, B, C, In](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], parallelism: Int)(test: (A, B, C) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAllMPar that accepts three random variables.

  77. def checkAllPar[R <: TestConfig, R1 <: R, E, A, B, In](rv1: Gen[R, A], rv2: Gen[R, B], parallelism: Int)(test: (A, B) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    A version of checkAllMPar that accepts two random variables.

  78. def checkAllPar[R <: TestConfig, R1 <: R, E, A, In](rv: Gen[R, A], parallelism: Int)(test: (A) ⇒ In)(implicit checkConstructor: CheckConstructor[R, In], trace: ZTraceElement): ZIO[OutEnvironment, OutError, TestResult]

    Permalink

    Checks in parallel the effectual test passes for all values from the given random variable.

    Checks in parallel the effectual test passes for all values from the given random variable. This is useful for deterministic Gen that comprehensively explore all possibilities in a given domain.

  79. def checkN(n: Int): CheckN

    Permalink

    Checks the test passes for the specified number of samples from the given random variable.

  80. val defaultTestRunner: TestRunner[TestEnvironment, Any]

    Permalink

    A Runner that provides a default testable environment.

  81. package diff

    Permalink
  82. def failed[E](cause: Cause[E])(implicit trace: ZTraceElement): ZIO[Any, TestFailure[E], Nothing]

    Permalink

    Creates a failed test result with the specified runtime cause.

  83. val ignored: UIO[TestSuccess]

    Permalink

    Creates an ignored test result.

  84. package internal

    Permalink
  85. package laws

    Permalink

    The laws package provides functionality for describing laws as values.

    The laws package provides functionality for describing laws as values. The fundamental abstraction is a set of ZLaws[Caps, R]. These laws model the laws that instances having a capability of type Caps are expected to satisfy. A capability Caps[_] is an abstraction describing some functionality that is common across different data types and obeys certain laws. For example, we can model the capability of two values of a type being compared for equality as follows:

    trait Equal[-A] {
      def equal(a1: A, a2: A): Boolean
    }

    Definitions of equality are expected to obey certain laws:

    1. Reflexivity - a1 === a1
    2. Symmetry - a1 === a2 ==> a2 === a1
    3. Transitivity - (a1 === a2) && (a2 === a3) ==> (a1 === a3)

    These laws define what the capabilities mean and ensure that it is safe to abstract across different instances with the same capability.

    Using ZIO Test, we can represent these laws as values. To do so, we define each law using one of the ZLaws constructors. For example:

    val transitivityLaw = ZLaws.Laws3[Equal]("transitivityLaw") {
      def apply[A: Equal](a1: A, a2: A, a3: A): TestResult =
        ???
    }

    We can then combine laws using the + operator:

    val reflexivityLaw: = ???
    val symmetryLaw:    = ???
    
    val equalLaws = reflexivityLaw + symmetryLaw + transitivityLaw

    Laws have a run method that takes a generator of values of type A and checks that those values satisfy the laws. In addition, objects can extend ZLawful to provide an even more convenient syntax for users to check that instances satisfy certain laws.

    object Equal extends Lawful[Equal]
    
    object Hash extends Lawful[Hash]
    
    object Ord extends Lawful[Ord]
    
    checkAllLaws(Equal + Hash + Ord)(Gen.int)

    Note that capabilities compose seamlessly because of contravariance. We can combine laws describing different capabilities to construct a set of laws requiring that instances having all of the capabilities satisfy each of the laws.

  86. def live[E, A](zio: ZIO[ZEnv, E, A])(implicit trace: ZTraceElement): ZIO[Live, E, A]

    Permalink

    Provides an effect with the "real" environment as opposed to the test environment.

    Provides an effect with the "real" environment as opposed to the test environment. This is useful for performing effects such as timing out tests, accessing the real time, or printing to the real console.

  87. val liveEnvironment: Layer[Nothing, ZEnv]

    Permalink
  88. def platformSpecific[R, E, A](js: ⇒ A, jvm: ⇒ A)(f: (A) ⇒ ZTest[R, E]): ZTest[R, E]

    Permalink

    Passes platform specific information to the specified function, which will use that information to create a test.

    Passes platform specific information to the specified function, which will use that information to create a test. If the platform is neither ScalaJS nor the JVM, an ignored test result will be returned.

  89. package poly

    Permalink
  90. package render

    Permalink
  91. def suite[In](label: String)(specs: In*)(implicit suiteConstructor: SuiteConstructor[In], trace: ZTraceElement): Spec[OutEnvironment, OutError, OutSuccess]

    Permalink

    Builds a suite containing a number of other specs.

  92. def test[In](label: String)(assertion: ⇒ In)(implicit testConstructor: TestConstructor[Nothing, In], trace: ZTraceElement): Out

    Permalink

    Builds a spec with a single test.

  93. val testEnvironment: ZLayer[Scope, Nothing, TestEnvironment]

    Permalink
  94. final macro def typeCheck(code: String): UIO[Either[String, Unit]]

    Permalink

    Returns either Right if the specified string type checks as valid Scala code or Left with an error message otherwise.

    Returns either Right if the specified string type checks as valid Scala code or Left with an error message otherwise. Dies with a runtime exception if specified string cannot be parsed or is not a known value at compile time.

    Definition Classes
    CompileVariants
  95. def versionSpecific[R, E, A](scala3: ⇒ A, scala2: ⇒ A)(f: (A) ⇒ ZTest[R, E]): ZTest[R, E]

    Permalink

    Passes version specific information to the specified function, which will use that information to create a test.

    Passes version specific information to the specified function, which will use that information to create a test. If the version is neither Scala 3 nor Scala 2, an ignored test result will be returned.

  96. def withLive[R, E, E1, A, B](zio: ZIO[R, E, A])(f: (IO[E, A]) ⇒ ZIO[ZEnv, E1, B])(implicit trace: ZTraceElement): ZIO[R with Live, E1, B]

    Permalink

    Transforms this effect with the specified function.

    Transforms this effect with the specified function. The test environment will be provided to this effect, but the live environment will be provided to the transformation function. This can be useful for applying transformations to an effect that require access to the "real" environment while ensuring that the effect itself uses the test environment.

    withLive(test)(_.timeout(duration))

Deprecated Value Members

  1. def checkAllM[R <: TestConfig, R1 <: R, E, A, B, C, D, F, G](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], rv6: Gen[R, G])(test: (A, B, C, D, F, G) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllM that accepts six random variables.

    A version of checkAllM that accepts six random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkAll

  2. def checkAllM[R <: TestConfig, R1 <: R, E, A, B, C, D, F](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F])(test: (A, B, C, D, F) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllM that accepts five random variables.

    A version of checkAllM that accepts five random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkAll

  3. def checkAllM[R <: TestConfig, R1 <: R, E, A, B, C, D](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D])(test: (A, B, C, D) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllM that accepts four random variables.

    A version of checkAllM that accepts four random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkAll

  4. def checkAllM[R <: TestConfig, R1 <: R, E, A, B, C](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C])(test: (A, B, C) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllM that accepts three random variables.

    A version of checkAllM that accepts three random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkAll

  5. def checkAllM[R <: TestConfig, R1 <: R, E, A, B](rv1: Gen[R, A], rv2: Gen[R, B])(test: (A, B) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllM that accepts two random variables.

    A version of checkAllM that accepts two random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkAll

  6. def checkAllM[R <: TestConfig, R1 <: R, E, A](rv: Gen[R, A])(test: (A) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    Checks the effectual test passes for all values from the given random variable.

    Checks the effectual test passes for all values from the given random variable. This is useful for deterministic Gen that comprehensively explore all possibilities in a given domain.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkAll

  7. def checkAllMPar[R <: TestConfig, R1 <: R, E, A, B, C, D, F, G](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], rv6: Gen[R, G], parallelism: Int)(test: (A, B, C, D, F, G) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllMPar that accepts six random variables.

    A version of checkAllMPar that accepts six random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkPar

  8. def checkAllMPar[R <: TestConfig, R1 <: R, E, A, B, C, D, F](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], parallelism: Int)(test: (A, B, C, D, F) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllMPar that accepts five random variables.

    A version of checkAllMPar that accepts five random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkPar

  9. def checkAllMPar[R <: TestConfig, R1 <: R, E, A, B, C, D](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], parallelism: Int)(test: (A, B, C, D) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllMPar that accepts four random variables.

    A version of checkAllMPar that accepts four random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkPar

  10. def checkAllMPar[R <: TestConfig, R1 <: R, E, A, B, C](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], parallelism: Int)(test: (A, B, C) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllMPar that accepts three random variables.

    A version of checkAllMPar that accepts three random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkPar

  11. def checkAllMPar[R <: TestConfig, R1 <: R, E, A, B](rv1: Gen[R, A], rv2: Gen[R, B], parallelism: Int)(test: (A, B) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkAllMPar that accepts two random variables.

    A version of checkAllMPar that accepts two random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkPar

  12. def checkAllMPar[R <: TestConfig, R1 <: R, E, A](rv: Gen[R, A], parallelism: Int)(test: (A) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    Checks in parallel the effectual test passes for all values from the given random variable.

    Checks in parallel the effectual test passes for all values from the given random variable. This is useful for deterministic Gen that comprehensively explore all possibilities in a given domain.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkPar

  13. def checkM[R <: TestConfig, R1 <: R, E, A, B, C, D, F, G](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F], rv6: Gen[R, G])(test: (A, B, C, D, F, G) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkM that accepts six random variables.

    A version of checkM that accepts six random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use check

  14. def checkM[R <: TestConfig, R1 <: R, E, A, B, C, D, F](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D], rv5: Gen[R, F])(test: (A, B, C, D, F) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkM that accepts five random variables.

    A version of checkM that accepts five random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use check

  15. def checkM[R <: TestConfig, R1 <: R, E, A, B, C, D](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C], rv4: Gen[R, D])(test: (A, B, C, D) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkM that accepts four random variables.

    A version of checkM that accepts four random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use check

  16. def checkM[R <: TestConfig, R1 <: R, E, A, B, C](rv1: Gen[R, A], rv2: Gen[R, B], rv3: Gen[R, C])(test: (A, B, C) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkM that accepts three random variables.

    A version of checkM that accepts three random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use check

  17. def checkM[R <: TestConfig, R1 <: R, E, A, B](rv1: Gen[R, A], rv2: Gen[R, B])(test: (A, B) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    A version of checkM that accepts two random variables.

    A version of checkM that accepts two random variables.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use check

  18. def checkM[R <: TestConfig, R1 <: R, E, A](rv: Gen[R, A])(test: (A) ⇒ ZIO[R1, E, TestResult])(implicit trace: ZTraceElement): ZIO[R1, E, TestResult]

    Permalink

    Checks the effectual test passes for "sufficient" numbers of samples from the given random variable.

    Checks the effectual test passes for "sufficient" numbers of samples from the given random variable.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use check

  19. def checkNM(n: Int): CheckNM

    Permalink

    Checks the effectual test passes for the specified number of samples from the given random variable.

    Checks the effectual test passes for the specified number of samples from the given random variable.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use checkN

  20. def suiteM[R, E, T](label: String)(specs: ZIO[R, E, Iterable[Spec[R, E, T]]])(implicit trace: ZTraceElement): Spec[R, E, T]

    Permalink

    Builds an effectual suite containing a number of other specs.

    Builds an effectual suite containing a number of other specs.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use suite

  21. def testM[R, E](label: String)(assertion: ⇒ ZIO[R, E, TestResult])(implicit trace: ZTraceElement): ZSpec[R, E]

    Permalink

    Builds a spec with a single effectful test.

    Builds a spec with a single effectful test.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use test

Inherited from CompileVariants

Inherited from AnyRef

Inherited from Any

Ungrouped