tui-test-renderer

Solid

Set up testing utilities for TUI components with ink-testing-library and Bubble Tea testing.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
44
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# TUI Test Renderer Set up testing utilities for TUI components. ## Generated Patterns ### Ink Testing ```typescript 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 ```go 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

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills