Skip to content

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

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.
isInvalidReturns a Matcher that matches an Invalid value.
isLeftReturns a Matcher that matches a Left value.
isNoneReturns a Matcher that matches a None value.
isRightReturns a Matcher that matches a Right value.
isSomeReturns a Matcher that matches a Some value.
isValidReturns a Matcher that matches a Valid value.
isValidNelReturns a Matcher that matches a Valid value for a ValidatedNel.
producesErrorMatches a Rill that fails with an error satisfying matcher.
producesInOrderMatches a Rill that emits elements in the exact order given by expected.
producesNothingMatches 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.
producesUnorderedMatches a Rill that emits the same elements as expected in any order.
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.