Run PHPUnit and Pest tests in VS Code with the native Test Explorer. Supports Docker, SSH, Laravel Sail, ParaTest, and Xdebug step-debugging.
168
stars
1,062
commits
TypeScript
primary language
Jul 13, 2026
updated
Monorepo for the PHPUnit & Pest Test Explorer VS Code extension.
| Package | Description |
|---|---|
packages/phpunit | @vscode-phpunit/phpunit — PHPUnit/Pest parser, runner, and tree-sitter utilities. Built with tsup (ESM + CJS). |
packages/extension | VS Code extension — Test Explorer integration for PHPUnit & Pest. Bundled with esbuild. Depends on @vscode-phpunit/phpunit. |
Core library that parses PHPUnit/Pest test files (via tree-sitter WASM), builds command lines, and processes test output. Published as @vscode-phpunit/phpunit.
tsup outputs ESM/CJS to dist/, and copies tree-sitter.wasm / tree-sitter-php.wasm into dist/.VS Code extension that integrates with the native Test Explorer UI. Consumes @vscode-phpunit/phpunit as a dev dependency; esbuild bundles everything into a single dist/extension.js.
esbuild bundles to dist/extension.js, and copies WASM files from node_modules/@vscode/tree-sitter-wasm/wasm/ to dist/.@vscode/test-electron (e2e)@vscode/vsce produces .vsixpnpm install
# Compile all packages (phpunit tsup + extension esbuild)
pnpm compile
# Run all unit tests
pnpm test
# Run e2e tests (extension only)
pnpm test:e2e
# Lint
pnpm lint
# Type check
pnpm typecheck
# Production build for extension (minified)
pnpm package
# Produce .vsix file
cd packages/extension && pnpm exec vsce package --no-dependencies
The repository includes launch configurations in .vscode/launch.json:
| Configuration | Description |
|---|---|
| Run Extension | Opens with a local phpunit-stub project |
| Run Extension (Multi-Workspace) | Opens a multi-folder workspace (local) |
| Run Extension (Docker Multi-Workspace) | Opens a multi-folder workspace running inside Docker |
Start the shared container:
cd packages/phpunit/tests/fixtures/workspaces
docker compose up -d --build
Select Run Extension (Docker Multi-Workspace) from the debug panel and press F5.
Stop the container:
docker compose down
TypeScript
99.4%
Run PHPUnit and Pest tests in VS Code with the native Test Explorer. Supports Docker, SSH, Laravel Sail, ParaTest, and Xdebug step-debugging.
168
stars
1,062
commits
TypeScript
primary language
Jul 13, 2026
updated
Monorepo for the PHPUnit & Pest Test Explorer VS Code extension.
| Package | Description |
|---|---|
packages/phpunit | @vscode-phpunit/phpunit — PHPUnit/Pest parser, runner, and tree-sitter utilities. Built with tsup (ESM + CJS). |
packages/extension | VS Code extension — Test Explorer integration for PHPUnit & Pest. Bundled with esbuild. Depends on @vscode-phpunit/phpunit. |
Core library that parses PHPUnit/Pest test files (via tree-sitter WASM), builds command lines, and processes test output. Published as @vscode-phpunit/phpunit.
tsup outputs ESM/CJS to dist/, and copies tree-sitter.wasm / tree-sitter-php.wasm into dist/.VS Code extension that integrates with the native Test Explorer UI. Consumes @vscode-phpunit/phpunit as a dev dependency; esbuild bundles everything into a single dist/extension.js.
esbuild bundles to dist/extension.js, and copies WASM files from node_modules/@vscode/tree-sitter-wasm/wasm/ to dist/.@vscode/test-electron (e2e)@vscode/vsce produces .vsixpnpm install
# Compile all packages (phpunit tsup + extension esbuild)
pnpm compile
# Run all unit tests
pnpm test
# Run e2e tests (extension only)
pnpm test:e2e
# Lint
pnpm lint
# Type check
pnpm typecheck
# Production build for extension (minified)
pnpm package
# Produce .vsix file
cd packages/extension && pnpm exec vsce package --no-dependencies
The repository includes launch configurations in .vscode/launch.json:
| Configuration | Description |
|---|---|
| Run Extension | Opens with a local phpunit-stub project |
| Run Extension (Multi-Workspace) | Opens a multi-folder workspace (local) |
| Run Extension (Docker Multi-Workspace) | Opens a multi-folder workspace running inside Docker |
Start the shared container:
cd packages/phpunit/tests/fixtures/workspaces
docker compose up -d --build
Select Run Extension (Docker Multi-Workspace) from the debug panel and press F5.
Stop the container:
docker compose down
TypeScript
99.4%