# Testing signals — microsoft/vscode

> Canonical page: https://codevetter.com/unpack/vscode/testing-signals

# Testing signals — microsoft/vscode

Scanned commit f6439326f6891a1eaf254a19fc1a78243cbb8f9d (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Unit tests are colocated in src/vs/*/test folders (2041 *.test.ts files under src/vs) and run with mocha in TDD style under three runners: inside the built Electron binary (scripts/test.sh → test/unit/electron/index.js), in real browsers via Playwright (test/unit/browser/index.js, npm run test-browser), and in plain node (npm run test-node). Integration tests exercise the extension host via vscode-test (test/integration, scripts/test-integration.sh), and a Playwright-driven smoke suite lives in test/smoke with a test/automation driver library. CI runs per-OS test workflows plus compile/hygiene, layers, and cyclic-dependency gates.
- Unit tests live next to sources in src/vs/**/test directories and use mocha with the tdd UI; npm run test-node runs mocha test/unit/node/index.js with --ui=tdd --timeout=5000. — [package.json#L16](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/package.json#L16) [test/unit/node/index.js](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/test/unit/node/index.js) [.github/copilot-instructions.md#L8](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/copilot-instructions.md#L8)
- Browser unit tests run under real browsers via Playwright: test/unit/browser/index.js requires @playwright/test, spins a yaserver http server, and defaults to chromium+firefox+webkit. — [test/unit/browser/index.js#L1-L50](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/test/unit/browser/index.js#L1-L50) [package.json#L14-L15](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/package.json#L14-L15)
- Electron unit tests run inside the built product: scripts/test.sh downloads Electron (npm run electron / .build/electron) then executes the binary against test/unit/electron/index.js with ELECTRON_ENABLE_LOGGING=1. — [scripts/test.sh](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/scripts/test.sh) [test/unit/electron/index.js](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/test/unit/electron/index.js)
- Smoke tests in test/smoke are Playwright-based end-to-end tests driven by the test/automation package, launched via npm run smoketest which prelaunches, compiles test/smoke, then runs test/index.js. — [test/smoke/package.json](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/test/smoke/package.json) [test/automation/package.json](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/test/automation/package.json) [package.json#L62-L63](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/package.json#L62-L63)
- Extension integration tests run via vscode-test (npm run test-extension, scripts/test-integration.sh) with API surface exercised by the extensions/vscode-api-tests built-in test extension. — [package.json#L17](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/package.json#L17) [scripts/test-integration.sh](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/scripts/test-integration.sh) [extensions/vscode-api-tests/package.json](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/extensions/vscode-api-tests/package.json)
- CI gating: .github/workflows/pr.yml runs a 'Compile & Hygiene' job on self-hosted 1ES pools with node_modules caching; sibling workflows pr-darwin-test.yml, pr-linux-test.yml, pr-win32-test.yml and pr-node-modules.yml run per-OS tests; codeql.yml runs static analysis. — [.github/workflows/pr.yml](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/workflows/pr.yml) [.github/workflows/pr-darwin-test.yml](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/workflows/pr-darwin-test.yml) [.github/workflows/pr-linux-test.yml](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/workflows/pr-linux-test.yml) [.github/workflows/pr-win32-test.yml](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/workflows/pr-win32-test.yml) [.github/workflows/codeql.yml](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/workflows/codeql.yml)
- Static quality gates are first-class scripts: hygiene (build/hygiene.ts via precommit), eslint (build/eslint.ts with local rules in .eslint-plugin-local), stylelint, valid-layers-check, check-cyclic-dependencies, define-class-fields-check, tsec-compile-check, and vscode-dts compile checks. — [package.json#L55-L70](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/package.json#L55-L70) [eslint.config.js](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/eslint.config.js) [build/checker/layersChecker.ts](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/build/checker/layersChecker.ts)
- Coverage: platform services and base utilities have deep unit coverage (e.g., src/vs/code/test covers cliArgs, bootstrapESM, partsSplash, sharedProcess contribs), but renderer UI contribs are comparatively under-unit-tested and rely on the smoke suite (inference from test distribution). (inferred) — [src/vs/code/test/electron-browser/partsSplash.test.ts](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/src/vs/code/test/electron-browser/partsSplash.test.ts) [test/smoke/Audit.md](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/test/smoke/Audit.md) [test/smoke/src/main.ts](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/test/smoke/src/main.ts)
- Repo conventions for tests are documented: prefer snapshot-style assert.deepStrictEqual over many assertions, don't stub globals — inject fakes via optional constructor params, and use --grep selectors for targeted runs (scripts/test.sh). — [.github/copilot-instructions.md#L154-L156](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/copilot-instructions.md#L154-L156) [scripts/test.sh](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/scripts/test.sh)
- Performance signals are treated as tests: perf.mark() instrumentation throughout startup, npm run perf (scripts/code-perf.js), plus dedicated chat perf/leak scripts (perf:chat, perf:chat-leak) and a chat-perf GitHub workflow. — [src/main.ts#L23-L31](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/src/main.ts#L23-L31) [package.json#L86-L89](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/package.json#L86-L89) [.github/workflows/chat-perf.yml](https://github.com/microsoft/vscode/blob/f6439326f6891a1eaf254a19fc1a78243cbb8f9d/.github/workflows/chat-perf.yml)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
