unit-tests

Solid

Use when running unit tests in the VS Code repo. Covers the runTests tool, scripts/test.sh (macOS/Linux) and scripts/test.bat (Windows), and their supported arguments for filtering, globbing, and debugging tests.

Testing & QA 8 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
32
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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 `files` parameter. - Pass test names via the `testNames` parameter to filter which tests run. - Set `mode="coverage"` to collect coverage. Example (conceptual): run tests in `src/vs/editor/test/common/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: - **macOS / Linux:** `./scripts/test.sh [options]` - **Windows:** `.\scripts\test.bat [options]` These scripts download Electron if needed and launch the Mocha test runner. ### Commonly used options #### Bare file paths - Run tests from specific files Pass source file paths directly as positional arguments. The test runner automatically treats bare `.ts`/`.js` positional arguments as `--run` values. ```bash ./scripts/test.sh src/vs/editor/test/common/model.test.ts ``` ```bat .\scripts\test.bat src\vs\editor\test\common\model.test.ts ``` Multiple files: ```bash ./scripts/test.sh src/vs/editor/test/common/model.test.ts src/vs/editor/test/common/range.test.ts ``` #### `--run <file>` - Run tests from a specific file (explicit form) Accepts a **source file path** (sta...

Details

Author
chapmanjw
Repository
chapmanjw/clawdius
Created
1 months ago
Last Updated
today
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category