OpenParable
Skip to content
← Back to skills

Unit Test

Testing & Quality
unit-test

Unit Test is an Agent Skill for testing & quality published in the xtermjs/xterm.js repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Write and review xterm.js unit tests with project conventions. Use when editing `*.test.ts` files or when asked for test authoring guidelines.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/xtermjs/xterm.js/blob/HEAD/.agents/skills/unit-test/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/unit-test, 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.

Unit Test Instructions

When writing unit tests, follow these rules:

  • When writing unit tests for addons, always create a real xterm.js instance instead of mocking it.
  • Prefer assert.ok over assert.notStrictEqual when checking something is undefined or not.
  • Avoid comments as most tests should be self-documenting.