tui-testing-debugging
Installation
SKILL.md
TUI Testing and Debugging with Snapshots, PTYs, Virtual Terminals, and ConPTY
Use this skill when a TUI needs reliable tests or when an interactive terminal bug must be reproduced outside a human terminal session.
Four-layer test strategy
- Pure state tests. Test reducers, update functions, focus transitions, validation, sorting, filtering, and command scheduling without a terminal.
- Component/render snapshots. Render widgets at fixed width, height, theme, color level, locale, and time. Compare stable text or cell grids.
- Virtual terminal tests. Feed ANSI output into a terminal emulator and assert final cells, cursor, styles, scrollback, and cleanup.
- PTY integration tests. Spawn the real program, send keys/paste/resize, and assert visible behavior and exit status.
Snapshot stabilization
Freeze or normalize: