terminal-emulator

Featured

Test interactive CLI/TUI applications using @microsoft/tui-test. Use when you need to test CLI tools with interactive prompts, TUI rendering, arrow key navigation, or any command that requires a TTY. Triggers include "test CLI", "test TUI", "run interactively", "automate terminal input", "simulate user input in terminal".

AI & Automation 21,207 stars 1755 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 94/100

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

Skill Content

# Testing Interactive CLI / TUI with @microsoft/tui-test Playwright-like API for terminals. Real PTY per test. Made by Microsoft. - **GitHub**: https://github.com/microsoft/tui-test - **npm**: `@microsoft/tui-test` ## Install ```bash yarn add -D @microsoft/tui-test ``` ## Usage ```typescript import { test, expect } from '@microsoft/tui-test'; test.use({ program: { file: 'node', args: ['./my-cli.js'] } }); test('selects option and proceeds', async ({ terminal }) => { await expect(terminal.getByText('Select an option')).toBeVisible(); await terminal.write('\x1B[B'); // Arrow Down await terminal.submit(); // Enter await expect(terminal.getByText('Option 2 selected')).toBeVisible(); }); test('matches snapshot', async ({ terminal }) => { await expect(terminal).toMatchSnapshot(); }); ``` ## API ```typescript // Navigation await terminal.write('\x1B[A'); // Arrow Up await terminal.write('\x1B[B'); // Arrow Down await terminal.write('\x1B[C'); // Arrow Right await terminal.write('\x1B[D'); // Arrow Left await terminal.submit(); // Enter await terminal.write('\t'); // Tab await terminal.write('\x03'); // Ctrl+C await terminal.write('\x1B'); // Escape await terminal.write('\x7F'); // Backspace await terminal.write('hello'); // Type text // Assertions await expect(terminal.getByText('pattern')).toBeVisible(); await expect(terminal.getByText('pattern', { full: true })).toBeVisible(); await expect(te...

Details

Author
slopus
Repository
slopus/happy
Created
10 months ago
Last Updated
3 days ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Listed

testing-tauri-apps

Guides developers through testing Tauri applications including unit testing with mock runtime, mocking Tauri APIs, WebDriver end-to-end testing with Selenium and WebdriverIO, and CI integration with GitHub Actions.

21 Updated 4 months ago
dchuk
Testing & QA Featured

playwright-skill

Battle-tested Playwright patterns for writing, debugging, and scaling reliable test suites. Use when you need guidance for E2E, API, component, visual, accessibility, or security testing, plus CI/CD, CLI automation, page objects, and migration from Cypress or Selenium. TypeScript and JavaScript.

254 Updated today
testdino-hq
Testing & QA Solid

playwright-core

Battle-tested Playwright patterns for writing and debugging reliable E2E, API, component, visual, accessibility, and security tests. Use when you need locator strategy, assertions, fixtures, network mocking, auth flows, trace debugging, or framework recipes for React, Next.js, Vue, and Angular. TypeScript and JavaScript.

254 Updated today
testdino-hq
Testing & QA Listed

e2e

Activate for any work in the tests/e2e/ directory: creating or editing test files (tests/*.test.ts), page objects (pages/), helpers (helpers/), or vitest config. Enforces agent-browser conventions specific to this project.

23 Updated today
madarasz
Testing & QA Featured

e2e-testing

AI-powered E2E testing for any app — Flutter, React Native, iOS, Android, Electron, Tauri, KMP, .NET MAUI. Test 8 platforms with natural language through MCP. No test code needed. Just describe what to test and the agent sees screenshots, taps elements, enters text, scrolls, and verifies UI state automatically.

267 Updated 4 days ago
ai-dashboad