ribs_test
Test utilities and matchers for all ribs packages.
Re-exports ribs_core_test, ribs_effect_test, and ribs_rill_test as a single convenience import.
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. |
| isInvalid | Returns a Matcher that matches an Invalid value. |
| isLeft | Returns a Matcher that matches a Left value. |
| isNone | Returns a Matcher that matches a None value. |
| isRight | Returns a Matcher that matches a Right value. |
| isSome | Returns a Matcher that matches a Some value. |
| isValid | Returns a Matcher that matches a Valid value. |
| isValidNel | Returns a Matcher that matches a Valid value for a ValidatedNel. |
| producesError | Matches a Rill that fails with an error satisfying matcher. |
| producesInOrder | Matches a Rill that emits elements in the exact order given by expected. |
| producesNothing | Matches a Rill that succeeds without emitting any elements. |
| producesOnly<A> | Matches a Rill that emits exactly the single element a. |
| producesSameAs<A> | Matches a Rill that produces the same outcome (success, error, or cancelation) and the same elements as expected. |
| producesUnordered | Matches a Rill that emits the same elements as expected in any order. |
| 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. |