unit-tests

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

Updated Apr 28, 2026
Ready to run
npx skills add https://github.com/CokiStudios/cokistudios.github.io --skill unit-tests-cokistudios
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: unit-tests
Source: https://github.com/CokiStudios/cokistudios.github.io/tree/main/vscode-src/.github/skills/unit-tests
Command: npx skills add https://github.com/CokiStudios/cokistudios.github.io --skill unit-tests-cokistudios

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 - Preferred runTests Tool: Uses the structured runTests tool with file paths, test name filters, and coverage mode when available. - Shell Script Fallback: Runs tests via scripts/test.sh on macOS/Linux or scripts/test.bat on Windows with options like --run, --grep, --runGlob, --coverage, and --timeout. - Use Case: When you modify src/vs/editor and want to verify your change, run only the affected test file with a name filter instead of the entire suite, and generate a coverage report if needed. ## 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 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, passing test files as positional arguments.

How to run a single test file or filter tests by name in VS Code?▼

Pass the source file path directly, e.g. ./scripts/test.sh src/vs/editor/test/common/model.test.ts, or use --run explicitly. Add --grep "test name" to filter which tests run within the selected files.

Does scripts/test.sh run integration tests?▼

No, scripts/test.sh does not run integration tests. Files ending in .integrationTest.ts or located in extensions/ require 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 failures from stale output are common.

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

Set mode="coverage" on the runTests tool, or pass the --coverage flag to the test script, e.g. ./scripts/test.sh --run src/vs/editor/test/common/model.test.ts --coverage.