Skip to main content

Module test_utils

Module test_utils 

Source
Expand description

Headless test utilities for unit-testing TUI closures. Headless testing utilities.

TestBackend renders a UI closure to an in-memory buffer without a real terminal. EventBuilder constructs event sequences for simulating user input. Together they enable snapshot and assertion-based UI testing.

Structsยง

EventBuilder
Builder for constructing a sequence of input Events.
FrameRecord
Snapshot of a single rendered frame, captured by TestBackend::record_frames.
TestBackend
Headless rendering backend for tests.
TestSequence
Builder returned by TestBackend::sequence.