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
IORuntimefor testingIOprograms. -
Ticker<
A> -
A test harness that pairs an
IOprogram with a TestIORuntime, providing fine-grained control over time advancement and task execution.
Extensions
-
IOTickedOps
on IO<
A> -
Extension on
IOto create a Ticker for deterministic testing.
Constants
- cancels → const Matcher
-
A matcher that asserts an
IOis canceled before completion. - nonTerminating → const Matcher
-
A matcher that asserts an
IOdoes not terminate (runs forever) when evaluated with a TestIORuntime. - terminates → const Matcher
-
A matcher that asserts an
IOterminates (completes in finite time) when evaluated with a TestIORuntime.
Functions
-
errors(
[Object? matcher]) → Matcher -
A matcher that asserts an
IOcompletes 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 anIOprogram. -
succeeds(
[Object? matcher]) → Matcher -
A matcher that asserts an
IOcompletes successfully.