unit-tests

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

10|1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill unit-tests-kevinhuangislearning
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unit-tests
Source: https://github.com/KevinHuangIsLearning/shortestpath-ide/tree/main/.github/skills/unit-tests
Command: npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill unit-tests-kevinhuangislearning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running unit tests in the VS Code repository requires knowing the correct tool, script, and arguments for each platform, and mistakes like stale compiled output or wrong filters waste debugging time. ## Core Features & Use Cases - Structured test execution: Prefer the runTests tool with file paths, test name filters, and coverage mode for detailed pass/fail output. - Cross-platform shell fallback: Use scripts/test.sh on macOS/Linux or scripts/test.bat on Windows with options like --run, --grep, --runGlob, --coverage, and --timeout. - Use Case: After editing src/vs/editor/test/common/model.test.ts, run only the test named "should split lines" by combining a file filter with a grep pattern, then confirm compilation is up to date before trusting the results. ## Quick Start Run the unit tests in src/vs/editor/test/common/model.test.ts filtered to the test named "should split lines" using the preferred test runner.

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 repo?▼

Run unit tests with the runTests tool when available, passing absolute file paths and optional test name filters. Otherwise use ./scripts/test.sh on macOS/Linux or .\scripts\test.bat on Windows from the repo root.

How do I run a single test file or filter tests by name?▼

Pass the source file path as a positional argument or with --run, and add --grep with a pattern to filter by test title. For example, combine --run src/vs/editor/test/common/model.test.ts with --grep "should split lines".

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 for those instead.

Why do VS Code unit tests fail with stale or unexpected results?▼

Tests run against compiled JavaScript output, so failures often come from stale builds. Ensure the VS Code - Build watch task is running or compilation has completed before executing tests.

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

Add the --coverage flag to the test script, or set mode="coverage" when using the runTests tool. Coverage can be combined with --run to scope the report to specific test files.