ribs_test_effect library

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

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

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

Constants

cancels → const Matcher
A matcher that asserts an IO is canceled before completion.
nonTerminating → const Matcher
A matcher that asserts an IO does not terminate (runs forever) when evaluated with a TestIORuntime.
terminates → const Matcher
A matcher that asserts an IO terminates (completes in finite time) when evaluated with a TestIORuntime.

Functions

errors([Object? matcher]) → Matcher
A matcher that asserts an IO completes with an error.
expectIO(dynamic actual, dynamic matcher, {String? reason, Object? skip}) → IO<Unit>
Lifts a test expectation into IO, allowing assertions to be composed within an IO program.
succeeds([Object? matcher]) → Matcher
A matcher that asserts an IO completes successfully.