Tui Test Renderer
Testing & Qualitytui-test-rendererTui Test Renderer is an Agent Skill for testing & quality published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Set up testing utilities for TUI components with ink-testing-library and Bubble Tea testing.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/cli-mcp-development/skills/tui-test-renderer/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/tui-test-renderer, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
TUI Test Renderer
Set up testing utilities for TUI components.
Generated Patterns
Ink Testing
import { render } from 'ink-testing-library';
import React from 'react';
import { MyComponent } from './MyComponent';
test('renders correctly', () => {
const { lastFrame, stdin } = render(<MyComponent />);
expect(lastFrame()).toContain('Expected text');
stdin.write('\r'); // Simulate enter
expect(lastFrame()).toContain('After enter');
});
Bubble Tea Testing
import (
tea "github.com/charmbracelet/bubbletea"
"testing"
)
func TestModel(t *testing.T) {
m := initialModel()
m, _ = m.Update(tea.KeyMsg{Type: tea.KeyEnter})
view := m.View()
if !strings.Contains(view, "expected") {
t.Errorf("Expected view to contain 'expected'")
}
}
Target Processes
- tui-application-framework
- cli-unit-integration-testing