From a14b05bf641afcef5acf8418245f5505ea8c5c35 Mon Sep 17 00:00:00 2001 From: Bruce Eckel Date: Wed, 17 Jul 2024 19:29:26 -0600 Subject: [PATCH] Moving timeTravel to test file #bruce #time 15m --- Chapters/05_Testing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chapters/05_Testing.md b/Chapters/05_Testing.md index a8028052..c9be342f 100644 --- a/Chapters/05_Testing.md +++ b/Chapters/05_Testing.md @@ -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 @@ -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 =