* Forks a fiber that will display a warning message if a test is using time * but is not advancing the `TestClock`.
()
| 277 | * but is not advancing the `TestClock`. |
| 278 | */ |
| 279 | warningStart(): Effect.Effect<void> { |
| 280 | return synchronized.updateSomeEffect(this.warningState, (data) => |
| 281 | WarningData.isStart(data) ? |
| 282 | Option.some( |
| 283 | pipe( |
| 284 | this.live.provide( |
| 285 | pipe(effect.logWarning(warning), effect.delay(Duration.seconds(5))) |
| 286 | ), |
| 287 | core.interruptible, |
| 288 | fiberRuntime.fork, |
| 289 | core.map((fiber) => WarningData.pending(fiber)) |
| 290 | ) |
| 291 | ) : |
| 292 | Option.none()) |
| 293 | } |
| 294 | /** |
| 295 | * Cancels the warning message that is displayed if a test is using time but |
| 296 | * is not advancing the `TestClock`. |