unit-tests

Runs VS Code unit tests via the runTests tool or platform test scripts with filtering options.

1|Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Niiihuel/openide --skill unit-tests-niiihuel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unit-tests
Source: https://github.com/Niiihuel/openide/tree/main/vscode/.github/skills/unit-tests
Command: npx skills add https://github.com/Niiihuel/openide --skill unit-tests-niiihuel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running unit tests in the VS Code repository requires knowing the correct tool, platform-specific scripts, and argument syntax for filtering, globbing, and debugging tests, which is easy to get wrong. ## Core Features & Use Cases - Structured test execution: Prefers the runTests tool with file paths, test name filters, and coverage mode for detailed pass/fail output. - Cross-platform script fallback: Uses scripts/test.sh on macOS/Linux and scripts/test.bat on Windows when the tool is unavailable. - Flexible filtering: Supports bare file paths, --run, --grep, --runGlob, --coverage, and --timeout options. - Use Case: After editing src/vs/editor, run only the tests in model.test.ts matching "should split lines" to verify the change quickly. ## Quick Start Run the unit tests in src/vs/editor/test/common/model.test.ts filtered to tests named "should split lines".

Frequently Asked Questions about unit-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run unit tests in the VS Code repository?▼

Prefer the runTests tool with absolute file paths and optional test name filters. If unavailable, run ./scripts/test.sh on macOS/Linux or .\scripts\test.bat on Windows from the repo root.

How do I run only specific tests by name in VS Code?▼

Use the --grep option (aliases -g, -f) with a pattern matched against the full test title, for example ./scripts/test.sh --grep "should split lines". Combine it with --run to filter within a specific file.

Does scripts/test.sh run integration tests?▼

No, integration tests ending in .integrationTest.ts or located in extensions/ are not run by scripts/test.sh. Use scripts/test-integration.sh or scripts/test-integration.bat instead.

Why do VS Code unit tests fail with stale output errors?▼

Tests run against compiled JavaScript output, not TypeScript source. Ensure the VS Code - Build watch task is running or compilation has completed before running tests, since stale output is a common failure cause.

How do I run all tests under a feature area in VS Code?▼

Use --runGlob with a pattern matched against compiled .js files in the output directory, such as ./scripts/test.sh --runGlob "**/editor/test/**/*.test.js". The glob does not match source .ts files.