unit-tests

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

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/voidful/Aixlarity --skill unit-tests-voidful
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-tests
Source: https://github.com/voidful/Aixlarity/tree/main/aixlarity-ide/.github/skills/unit-tests
Command: npx skills add https://github.com/voidful/Aixlarity --skill unit-tests-voidful

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running the right subset of unit tests in the VS Code repository is confusing: there are multiple entry points (the runTests tool, test.sh, test.bat), different filtering flags, and a compilation prerequisite that causes misleading failures when forgotten. This Skill consolidates the correct commands and options so tests run the first time. ## 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. - Shell script fallback: Documents scripts/test.sh (macOS/Linux) and scripts/test.bat (Windows) with options like --run, --grep, --runGlob, --coverage, and --timeout. - Use Case: You changed src/vs/editor and want to verify only the affected tests. Run the specific test file with a --grep filter instead of the entire suite, then add --coverage to check your new code is exercised. ## Quick Start Run the unit tests in src/vs/editor/test/common/model.test.ts filtered to the test 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 a single unit test file in VS Code?

Pass the source file path directly to scripts/test.sh on macOS/Linux or scripts/test.bat on Windows, for example ./scripts/test.sh src/vs/editor/test/common/model.test.ts. The runner strips the src/ prefix and extension to resolve the compiled module.

How to filter Mocha tests by name in VS Code repo?

Use the --grep option (aliases -g, -f) with a pattern matching the test's full title, such as ./scripts/test.sh --grep "should split lines". Combine it with --run to filter tests 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 sources. Ensure the VS Code - Build watch task is running or compilation has completed before running tests, otherwise stale output causes misleading failures.

How do I generate a coverage report for VS Code tests?

Add the --coverage flag to the test script, for example ./scripts/test.sh --run src/vs/editor/test/common/model.test.ts --coverage. When using the runTests tool, set mode="coverage" instead.