Skip to content

Commit

Permalink
Moving timeTravel to test file #bruce #time 15m
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Eckel committed Jul 18, 2024
1 parent 4cecef5 commit a14b05b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Chapters/05_Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ We can do this because Effects are isolated and accessible, and because they del
Anything an Effect needs (from the system or the environment) can be substituted in tests for something predictable.
For example, an Effect that fetches users from a database can use simulated data without creating a test database.

To easily replace external systems during testing, we supply that external system via a `ZLayer` (covered in the [Initialization](04_Initialization.md) chapter).
To easily replace external systems during testing, we supply a substitute system via a `ZLayer` (covered in the [Initialization](04_Initialization.md) chapter).
The `provide` method proxies different `ZLayer` resources for different scenarios: testing, debugging, running normally, etc.

## Basic ZIO Testing
Expand Down Expand Up @@ -432,7 +432,7 @@ to manually advance the time.

To explicitly advance the time, call `adjust`:

```scala 3 mdoc:silent
```scala 3 mdoc:silent testzio
import zio.*

val timeTravel =
Expand Down

0 comments on commit a14b05b

Please sign in to comment.