Skip to content

ribs_test_effect ​

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 ​

ClassDescription
TestIORuntimeA 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 ​

ExtensiononDescription
IOTickedOps<A>IO<A>Extension on IO to create a Ticker for deterministic testing.

Functions ​

FunctionDescription
errorsA matcher that asserts an IO completes with an error.
expectIOLifts a test expectation into IO, allowing assertions to be composed within an IO program.
succeedsA matcher that asserts an IO completes successfully.

Constants ​

ConstantDescription
cancelsA matcher that asserts an IO is canceled before completion.
nonTerminatingA matcher that asserts an IO does not terminate (runs forever) when evaluated with a TestIORuntime.
terminatesA matcher that asserts an IO terminates (completes in finite time) when evaluated with a TestIORuntime.