Unit Tests
Unit-test runner guide covering the runTests tool and the platform scripts with filtering, globbing, and parallel options.
- CCM score
- 76 of 100
- skills.sh installs
- 257
- GitHub stars
- 195.8K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers running unit tests via the
runTeststool first, thenscripts/test.shandscripts/test.batas fallbacks - Includes filters
--run,--grep, and--runGlob, plus--coverage,--timeout,--workers, and--isolatefor debugging and isolation - Enforces compiled output as a prerequisite, reusing current output or running
pnpm run build-fast --client-onlybefore tests - Designed for contributors running VS Code repo unit tests from the CLI or an agent without the
runTeststool
Install
$ npx -y skills add microsoft/vscode --skill unit-tests -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Running Unit Tests
Preferred: Use the runTests tool
If the runTests tool is available, prefer it over running shell commands. It provides structured output with detailed pass/fail information and supports filtering by file and test name.
- Pass absolute paths to test files via the
filesparameter. - Pass test names via the
testNamesparameter to filter which tests run. - Set
mode="coverage"to collect coverage.
The tool runs tests discovered by VS Code's registered test controllers; it does not compile the repository or invoke a shell test command. If discovery is unavailable, pending, or reports no executed tests, treat the request as unvalidated and use the repository's configured test command. Review per-file and test-name diagnostics for partially matched requests instead of repeatedly checking the same paths.
Example (conceptual): run tests in src/vs/editor/test/common/model/model.test.ts with test name filter "should split lines".
Fallback: Shell scripts
When the runTests tool is not available (e.g. in CLI environments), use the platform-appropriate script from the repo root:
Details
- Repository
- github.com/microsoft/vscode
- Category
- Testing & QA
- First seen
- Jun 3, 2026
Questions
What does the unit-tests skill do for a VS Code developer?
The unit-tests skill tells the agent how to run unit tests in the VS Code repository. It covers the runTests tool, which is preferred when available, and the fallback scripts scripts/test.sh on macOS and Linux and scripts/test.bat on Windows.
How do I run only some unit tests with the unit-tests skill?
Pass test file paths as bare positional arguments, or use --run for a specific file. Add --grep with a pattern to filter tests by name, or --runGlob to run all compiled test files matching a glob.
How do I install the unit-tests skill?
Run npx -y skills add microsoft/vscode --skill unit-tests -y in your project. The skill then lets the agent run VS Code unit tests with the right options for filtering, coverage, timeouts and parallel workers.
Where does the unit-tests skill stand in the Testing & QA category?
The unit-tests skill sits in the Testing & QA category on Claude Marketplaces, alongside tdd, test-driven-development, webapp-testing and break-ui. It is specific to running the unit tests of the VS Code repository, not general test writing.
More from microsoft/vscode
All 11Similar to Unit Tests
More Testing & QAvitest-testingsecondsky/claude-skills1.3K installsModern Vitest guide for TypeScript and JavaScript tests, covering unit, integration, mocking, and coverage workflows.
vitestantfu/skills50.1K installsVitest-based unit testing guidance covering the Jest-compatible API, mocking, coverage, and test filtering.
testingmindrally/skills898 installsGeneral testing guidance covering isolation, data setup, coverage, and assertion clarity across frameworks and languages.
shell-testing-frameworkmanutej/luxor-claude-marketplace442 installsBash testing guide built on unix-goto patterns, requiring 100% coverage across four test categories.
continuous-testingaj-geddes/useful-ai-prompts444 installsStaged CI/CD testing guide that runs fast unit checks first and gates deployments on test results.
testparcadei/continuous-claude-v3506 installsParallel test workflow that runs type checks and unit/integration tests first, then gates slow E2E tests.