writing-unit-tests
SKILL.md
Writing Unit Tests Skill
This skill provides guidelines for AI agents writing unit tests for the Hex1b TUI library. It outlines the preferred testing approach, patterns, and anti-patterns to avoid.
Core Philosophy
- Prefer full terminal stack testing - Use
Hex1bTerminal.CreateBuilder()to create complete terminal environments - Use
.WithHex1bApp()for TUI functionality tests - This wires up the full app lifecycle - Keep tests simple and linear - Avoid excessive abstractions; repeating patterns are beneficial for AI agents
- Assert on visual behavior - Use
CellPatternSearcherand color assertions for render verification - Update this skill when discovering new patterns - Build the body of knowledge as part of PRs