ribs_effect_test
Test utilities and matchers for ribs_effect.
Provides a deterministic TestIORuntime for precise control over time in tests, along with matchers like succeeds, errors, and cancels for asserting on IO program outcomes.
Classes
| Class | Description |
|---|---|
| TestIORuntime | A deterministic IORuntime for testing IO programs. |
| Ticker<A> | A test harness that pairs an IO program with a TestIORuntime, providing fine-grained control over time advancement and task execution. |
Extensions
| Extension | on | Description |
|---|---|---|
| IOTickedOps<A> | IO<A> | Extension on IO to create a Ticker for deterministic testing. |
Functions
| Function | Description |
|---|---|
| errors | A matcher that asserts an IO completes with an error. |
| expectIO | Lifts a test expectation into IO, allowing assertions to be composed within an IO program. |
| succeeds | A matcher that asserts an IO completes successfully. |
Constants
| Constant | Description |
|---|---|
| cancels | A matcher that asserts an IO is canceled before completion. |
| nonTerminating | A matcher that asserts an IO does not terminate (runs forever) when evaluated with a TestIORuntime. |
| terminates | A matcher that asserts an IO terminates (completes in finite time) when evaluated with a TestIORuntime. |