Live

zio.test.Live
See theLive companion object
trait Live

The Live trait provides access to the "live" default ZIO services from within ZIO Test for workflows such as printing test results to the console or timing out tests where it is necessary to access the real implementations of these services.

The easiest way to access the "live" services is to use the live method with a workflow that would otherwise use the test version of the default ZIO services.

import zio.Clock
import zio.test._

val realTime = live(Clock.nanoTime)

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

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Test

Members list

Value members

Abstract methods

def provide[R, E, A](zio: ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]