{"id":13769087,"url":"https://github.com/firsttris/vscode-jest-runner","last_synced_at":"2026-03-01T09:01:23.136Z","repository":{"id":38373084,"uuid":"115735320","full_name":"firsttris/vscode-jest-runner","owner":"firsttris","description":"Run and debug Jest, Vitest, Node.js, Bun, Deno and Playwright tests with ease, right from your editor.","archived":false,"fork":false,"pushed_at":"2026-02-23T13:54:10.000Z","size":11539,"stargazers_count":294,"open_issues_count":2,"forks_count":140,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-02-23T15:44:02.350Z","etag":null,"topics":["bun","debugging","deno","jest","jest-tests","nodejs","playwright","tdd","test-automation","testing","testing-tools","typescript","vcode-api","vitest","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firsttris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-12-29T15:58:24.000Z","updated_at":"2026-02-23T13:54:14.000Z","dependencies_parsed_at":"2023-12-31T09:25:19.325Z","dependency_job_id":"cd3d8bf8-a7d6-4cee-8290-83624f9c454f","html_url":"https://github.com/firsttris/vscode-jest-runner","commit_stats":{"total_commits":307,"total_committers":69,"mean_commits":4.449275362318841,"dds":0.4495114006514658,"last_synced_commit":"f609953c48751f8c224f5ca4d15816bd833870bb"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/firsttris/vscode-jest-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firsttris%2Fvscode-jest-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firsttris%2Fvscode-jest-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firsttris%2Fvscode-jest-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firsttris%2Fvscode-jest-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firsttris","download_url":"https://codeload.github.com/firsttris/vscode-jest-runner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firsttris%2Fvscode-jest-runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29965419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","debugging","deno","jest","jest-tests","nodejs","playwright","tdd","test-automation","testing","testing-tools","typescript","vcode-api","vitest","vscode","vscode-extension"],"created_at":"2024-08-03T17:00:17.041Z","updated_at":"2026-03-01T09:01:23.045Z","avatar_url":"https://github.com/firsttris.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# 🧪 Jest \u0026 Vitest Runner\n\n**Run and debug tests with ease, right from your editor**\n\n![Extension Example](./docs/Banner.png)\n\n[![Build](https://img.shields.io/github/actions/workflow/status/firsttris/vscode-jest-runner/master.yml?branch=master\u0026label=Build\u0026logo=github\u0026style=flat-square)](https://github.com/firsttris/vscode-jest-runner/actions/workflows/master.yml)\n[![Coverage](https://img.shields.io/codecov/c/github/firsttris/vscode-jest-runner?logo=codecov\u0026style=flat-square)](https://codecov.io/gh/firsttris/vscode-jest-runner)\n[![VS Marketplace Version](https://vsmarketplacebadges.dev/version-short/firsttris.vscode-jest-runner.svg)](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner)\n[![Open VSX](https://img.shields.io/open-vsx/v/firsttris/vscode-jest-runner?label=Open%20VSX\u0026style=flat-square)](https://open-vsx.org/extension/firsttris/vscode-jest-runner)\n[![Installs](https://vsmarketplacebadges.dev/installs-short/firsttris.vscode-jest-runner.svg)](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner)\n[![Rating](https://vsmarketplacebadges.dev/rating-short/firsttris.vscode-jest-runner.svg)](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n[Overview](#-overview) •\n[Features](#-features) •\n[Configuration](#️-configuration) •\n[Keyboard Shortcuts](#️-configuration) •\n[Contributing](#-contributing)\n\n\u003c/div\u003e\n\n---\n\n## 🎯 Overview\n\nA **lightweight** VS Code extension for running and debugging Jest, Vitest, Node.js (native), Bun, Deno, and Playwright tests directly in your editor. Works **out-of-the-box** with minimal configuration.\n\n\u003e ✨ **What's New?** Try the new native Test Explorer with code coverage integration! Enable it by setting `\"jestrunner.enableTestExplorer\": true` in your VS Code settings.\n\n\u003e ⚠️ **Important:** The extension uses **AST-based parsing** to read configuration files. It supports static resolution of variables defined in the file and configuration wrappers (like `defineConfig`), but it does **not** execute the file (function calls are ignored). Complex runtime logic or external imports are not supported. If your configuration is too complex, you can set **`disableFrameworkConfig: true`** to rely on **`defaultTestPatterns`**.\n\n\u003e 🚧 **Notice:** The extension is currently undergoing major refactoring. If you encounter any issues or have questions, please don't hesitate to [create a GitHub issue](https://github.com/firsttris/vscode-jest-runner/issues).\n\n## ✨ Features\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🚀 Run \u0026 Debug Experience\n\n- ✅ **Run individual tests** or entire test suites with a single click\n- 🐛 **Debug tests** with full breakpoint and variable inspection support\n- 📊 **Generate coverage reports** to analyze test coverage\n- 👀 **Watch mode** for automatic test re-runs during development\n- 📸 **Snapshot updating** with dedicated command\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 📋 Multiple Access Points\n\n- 🖱️ **Context menu** in editor and explorer (right-click on tests)\n- 🔍 **CodeLens** annotations above test definitions (optional)\n- 🗂️ **Test Explorer** integration showing test hierarchy in dedicated panel\n- ⌨️ **Command palette** (Ctrl+Shift+P) with full command access\n- ⚡ **Keyboard shortcuts** for quick test execution\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🎯 Smart Test Detection\n\n- 🤖 **Automatic framework detection** - distinguishes between Jest, Vitest, Node.js, Bun, Deno, and Playwright tests\n- 🔍 **Reads and applies include/exclude patterns** (globs and regex) from [framework configs](#️-configuration) for fine-grained control over which tests appear\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 💼 Project Flexibility\n\n- 📦 **Monorepo support** for yarn \u0026 VS Code workspaces\n- ⚙️ **Multiple configurations** with glob-based config resolution\n- ⚛️ **Create React App** and similar abstraction layers\n- 🛠️ **Framework support** including Vite, Tanstack Start, Nx, Next.js, and NestJS\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## ⚙️ Configuration\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📊 Coverage Support\u003c/b\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\nThe extension supports test coverage through VS Code's Test Explorer. When you run tests with coverage, the results are displayed directly in VS Code's coverage view.\n\n**Prerequisites**\n\n**For Jest:**\n\n- Coverage works out of the box! No configuration needed.\n\n**For Vitest:**\n\n- Install a coverage provider:\n\n```bash\nnpm install -D @vitest/coverage-v8\n# or\nnpm install -D @vitest/coverage-istanbul\n```\n\n- You only need to specify the coverage provider in `vitest.config.ts`:\n\n```typescript\n// vitest.config.ts\nimport { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  test: {\n    coverage: {\n      provider: 'v8', // or 'istanbul'\n    },\n  },\n});\n```\n\n**For Node.js Native Test Runner:**\n- Coverage is supported natively via the `--experimental-test-coverage` flag (enabled by default for coverage runs).\n- No extra setup required!\n\n**For Bun:**\n- Coverage works out of the box! (uses `bun test --coverage`)\n- No extra setup required.\n\n\n**Coverage Directory Detection**\n\nThe extension automatically detects the coverage directory from your framework configuration:\n\n- **Jest**: Reads the `coverageDirectory` option from your Jest config\n- **Vitest**: Reads the `reportsDirectory` option from your Vitest coverage config\n- **Node.js**: Defaults to `coverage/` directory (standard native behavior)\n\nIf not specified, it defaults to `coverage/` in your project root.\n\n**Running Tests with Coverage**\n\nAll coverage entry points use the same **Coverage** profile powered by VS Code's native coverage API.\n\n**Coverage via Test Explorer**\n\n- Click the \"Coverage\" button (shield icon) in the Test Explorer panel\n- Coverage results appear in VS Code's Coverage panel (View → Testing → Show Coverage)\n- Inline decorations in the editor show covered/uncovered lines\n\n**Coverage via CodeLens / Command Palette**\n\n- Use the CodeLens \"Coverage\" action (if enabled) above a test or suite\n- Or run the Command Palette command: \"Jest: Run Test with Coverage\"\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🛠️ Extension Settings\u003c/b\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\nCustomize the test runner for your project:\n\n| Setting                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Jest Configuration**                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.configPath`                     | Path to Jest config (relative to workspace folder, e.g. `jest-config.json`). Can be a string or a glob mapping object to support multiple Jest configs.\u003cbr\u003e\u003cbr\u003e**Example with glob mapping:** `{\"**/*.it.spec.ts\": \"./jest.it.config.js\", \"**/*.spec.ts\": \"./jest.unit.config.js\"}` - The first matching glob is used, so specify more specific patterns first. Config path is relative to `jestrunner.projectPath` or workspace root. Use `jestrunner.useNearestConfig: true` to search up directories for the matching config file. |\n| `jestrunner.jestCommand`                    | Define an alternative Jest command for projects using abstractions like Create React App (e.g. `npm run test --`).                                                                                                                                                                                                                                                                                                                                                                                                                    |\n| `jestrunner.runOptions`                     | CLI options to add to Jest commands (e.g. `[\"--coverage\", \"--colors\"]`). See [Jest CLI documentation](https://jestjs.io/docs/en/cli).                                                                                                                                                                                                                                                                                                                                                                                                 |\n| `jestrunner.debugOptions`                   | Add or override VS Code debug configurations (e.g. `{ \"args\": [\"--no-cache\"] }`). Only applies when debugging tests.                                                                                                                                                                                                                                                                                                                                                                                                                  |\n| `jestrunner.enableESM`                      | Manually enable ESM support. When set to true, `--experimental-vm-modules` is added to NODE_OPTIONS. Default: `false`.                                                                                                                                                                                                                                                                                                                                                                                                                |\n| **Vitest Configuration**                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.vitestConfigPath`               | Path to Vitest config (relative to workspace folder, e.g. `vitest.config.ts`). Can be a string or a glob mapping object similar to `configPath`.                                                                                                                                                                                                                                                                                                                                                                                      |\n| `jestrunner.vitestCommand`                  | Define an alternative Vitest command (default: `npx --no-install vitest`).                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| `jestrunner.vitestRunOptions`               | CLI options to add to Vitest commands (e.g. `[\"--reporter=verbose\"]`). See [Vitest CLI documentation](https://vitest.dev/guide/cli.html).                                                                                                                                                                                                                                                                                                                                                                                             |\n| `jestrunner.vitestDebugOptions`             | Add or override VS Code debug configurations for Vitest (e.g. `{ \"args\": [\"--no-cache\"] }`). Only applies when debugging Vitest tests.                                                                                                                                                                                                                                                                                                                                                                                                |\n| **Node.js Test Configuration**              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.nodeTestCommand`                | Define an alternative Node.js test command (defaults to `node`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `jestrunner.nodeTestRunOptions`             | CLI options to add to the Node.js test runner command (e.g. `[\"--experimental-test-coverage\"]`).                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `jestrunner.nodeTestDebugOptions`           | Add or override VS Code debug configurations for local Node.js tests (e.g. `{ \"args\": [\"--no-warnings\"] }`). Only applies when debugging `node:test` tests.                                                                                                                                                                                                                                                                                                                                                                           |\n| **Bun Configuration**                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.bunRunOptions`                  | CLI options to add to Bun test command (e.g. `[\"--silent\"]`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `jestrunner.bunDebugOptions`                | Add or override VS Code debug configurations for Bun (e.g. `{ \"args\": [\"--no-cache\"] }`). Only applies when debugging bun tests.\u003cbr\u003e\u003cbr\u003e⚠️ **Note:** Debugging requires the [Bun for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=Oven.bun-vscode) extension. |\n| **Deno Configuration**                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.denoRunOptions`                 | CLI options to add to Deno test command (e.g. `[\"--allow-net\"]`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| `jestrunner.denoDebugOptions`               | Add or override VS Code debug configurations for Deno. Only applies when debugging deno tests.                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| **Playwright Configuration**              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.playwrightConfigPath`           | Path to Playwright config (relative to workspace folder, e.g. `playwright.config.ts`).                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| `jestrunner.disablePlaywright`              | Disable the Playwright test runner integration. Default: `false`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| `jestrunner.playwrightCommand`              | Define an alternative Playwright command (default: `npx playwright test`).                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| `jestrunner.playwrightRunOptions`           | CLI options to add to Playwright commands (e.g. `[\"--headed\"]`). See [Playwright CLI documentation](https://playwright.dev/docs/test-cli).                                                                                                                                                                                                                                                                                                                                                                                            |\n| `jestrunner.playwrightDebugOptions`         | Add or override VS Code debug configurations for Playwright. Only applies when debugging Playwright tests.                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| **UI Options**                              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.defaultTestPatterns`            | Fallback patterns used when no 'testMatch'/'testRegex' (Jest) or 'include' (Vitest) configuration is found. Default: `[\"**/*.{test,spec}.?(c\\|m)[jt]s?(x)\", \"**/__tests__/**/*.?(c\\|m)[jt]s?(x)\"]`                                                                                                                                                                                                                                                                                                                                                         |\n| `jestrunner.enableTestExplorer`             | Enable the Test Explorer integration using VS Code's Testing API. Shows tests in dedicated Test Explorer panel. Default: `false`                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `jestrunner.enableCodeLens`                 | Bring back the old CodeLens feature with inline run/debug buttons (replaced by Test Explorer). Default: `true`                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| `jestrunner.codeLens`                       | Specify which CodeLens actions to show when CodeLens is enabled. Options: `\"run\"`, `\"debug\"`, `\"watch\"`, `\"coverage\"`, `\"current-test-coverage\"`. Default: `[\"run\", \"debug\"]`                                                                                                                                                                                                                                                                                                                                         |\n| `jestrunner.preserveEditorFocus`            | Keep focus on the editor instead of switching to the terminal when running tests.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| **Debugging**                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.enableDebugLogs`                | Enable debug logging to the \"Jest Runner\" output channel. Useful for troubleshooting test detection and configuration issues. Default: `false`                                                                                                                                                                                                                                                                                                                                                                                        |\n| `jestrunner.maxBufferSize`                  | Maximum buffer size in MB for test output (default: `50`MB).                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| **Project Management**                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `jestrunner.projectPath`                    | Path to project directory. Can be absolute (e.g. `/home/me/project/sub-folder`) or relative to workspace root (e.g. `./sub-folder`).                                                                                                                                                                                                                                                                                                                                                                                                  |\n| `jestrunner.changeDirectoryToWorkspaceRoot` | Change directory before running tests. Priority order: 1. `projectPath` 2. nearest package.json location 3. workspace folder.                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `jestrunner.useNearestConfig`               | If `true`, the extension automatically searches for the nearest configuration file (e.g. `jest.config.js` or `package.json`) relative to the test file. Useful for projects with multiple configs or nested projects where no global config is set.\u003cbr\u003e\u003cbr\u003e**Default: `false`** (Strict Mode). By default, if `configPath` is empty, the extension passes **no** config argument to Jest, allowing native resolution (best for Monorepos).                                                                               |\n| `jestrunner.disableFrameworkConfig`         | If true, the extension will ignore any framework configuration files (e.g. jest.config.js, vitest.config.ts) and use the `jestrunner.defaultTestPatterns` instead.                                                                                                                                                                                                                                                                                                                                                                    |\n\nThis updated configuration table now includes the Node.js Test Runner settings.\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📋 Supported Framework Config\u003c/b\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\nThe extension **automatically reads configuration** from your framework config files.\n\n\u003e ⚠️ **Important:** The extension uses **AST-based parsing** to read configuration files. It does **not** execute the file as JavaScript/TypeScript code.\n\u003e \n\u003e This means:\n\u003e - It **cannot** resolve external imports or complex runtime logic.\n\u003e - **Variables** are supported via static analysis as long as they are defined within the file.\n\u003e - **Function Calls** are **not** executed. Only configuration wrappers (like `defineConfig`) are supported.\n\u003e - Only a **single configuration file** is parsed. If you use config inheritance, ensure the file the extension reads contains the necessary patterns.\n\u003e\n\u003e If your configuration is too complex for this parser, you can set **`jestrunner.disableFrameworkConfig: true`**. This will disable config parsing and the extension will rely solely on `jestrunner.defaultTestPatterns` to identify test files.\n\n### 🏗️ Projects Support\nThe extension supports the `projects` configuration for both **Jest** and **Vitest**. This is essential for monorepos or multi-project workspaces.\n\n- **Jest**: Supports `projects` array defined as string paths (e.g. `['\u003crootDir\u003e/packages/*']`) or configuration objects.\n- **Vitest**: Supports `projects` array in your config file or `vitest.workspace.ts` exporting an array of project configurations.\n\nThe extension will recursively parse these project configurations to identify test files across your entire workspace.\n\n### Jest Config Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `rootDir` | `string` | Root directory for resolving paths |\n| `roots` | `string[]` | Directories to search for test files (e.g., `[\"\u003crootDir\u003e/src\", \"\u003crootDir\u003e/tests\"]`) |\n| `testMatch` | `string[]` | Glob patterns for test files (e.g., `[\"**/*.test.ts\"]`) |\n| `testRegex` | `string \\| string[]` | Regex patterns for test files |\n| `testPathIgnorePatterns` | `string[]` | Regex patterns to exclude files (e.g., `[\"/fixtures/\", \"/node_modules/\"]`) |\n| `projects` | `string[] \\| object[]` | List of projects or paths to project config files |\n\n**Example Jest Config:**\n\n```javascript\n// jest.config.js\nmodule.exports = {\n  rootDir: '.',\n  roots: ['\u003crootDir\u003e/src', '\u003crootDir\u003e/tests'],\n  testMatch: ['**/?(*.)+(spec|test).ts?(x)'],\n  testPathIgnorePatterns: ['/node_modules/', '/fixtures/', '/__mocks__/'],\n};\n```\n\n### Vitest Config Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `root` | `string` | Project root directory |\n| `test.dir` | `string` | Base directory for test file discovery |\n| `test.include` | `string[]` | Glob patterns for test files (e.g., `[\"**/*.test.ts\"]`) |\n| `test.exclude` | `string[]` | Glob patterns to exclude (e.g., `[\"**/e2e/**\"]`) |\n| `projects` | `object[] \\| string[]` | List of project configurations (or workspace array) |\n\n**Example Vitest Config:**\n\n```typescript\n// vitest.config.ts\nimport { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  root: '.',\n  test: {\n    dir: 'src',\n    include: ['**/*.{test,spec}.{js,ts,jsx,tsx}'],\n    exclude: ['**/node_modules/**', '**/e2e/**', '**/fixtures/**'],\n  },\n});\n```\n\n### Node.js Native Runner\n\nThe Node.js test runner does not use a specific configuration file in the same way Jest or Vitest do. Instead, it relies on glob patterns or file naming conventions.\n\n- By default, the extension looks for files matching: `**/*.{test,spec}.?(c|m)[jt]s?(x)` and `**/__tests__/**/*.?(c|m)[jt]s?(x)`.\n- You can customize this by modifying `jestrunner.defaultTestPatterns` in your VS Code settings.\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🔧 Advanced Configuration Examples\u003c/b\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\n**Usage with CRA or similar abstractions**\n\nAdd the following command to settings:\n\n```json\n\"jestrunner.jestCommand\": \"npm run test --\",\n\"jestrunner.debugOptions\": {\n    \"runtimeExecutable\": \"${workspaceRoot}/node_modules/.bin/react-scripts\",\n    \"runtimeArgs\": [\"test\", \"${fileBasename}\", \"--runInBand\", \"--no-cache\", \"--watchAll=false\"]\n}\n```\n\n**nvm**\n\n```json\n\"jestrunner.jestCommand\": \"nvm use \u0026\u0026 npm run test --\",\n\"jestrunner.debugOptions\": {\n    \"runtimeExecutable\": \"/PATH/TO/YOUR/node\"\n}\n```\n\n**ESM (ECMAScript Modules)**\n\nESM support is now opt-in. To enable it, set **\"jestrunner.enableESM\": true** in your settings. This will automatically add `--experimental-vm-modules` to `NODE_OPTIONS` for debugging.\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🧪 Advanced Test Examples\u003c/b\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\nThe extension fully supports Jest's parameterized tests using `it.each` and `describe.each`. These allow you to run the same test logic with different inputs, making your tests more concise and maintainable.\n\nIn the test names, you can use **template variables** like `%s` (string), `%i` (integer), `%f` (float), etc., which Jest replaces with the actual parameter values for better readability.\n\n**Jest Example**\n\n```javascript\nit.each([\n  ['apple', 5],\n  ['banana', 6],\n  ['cherry', 6],\n])('should return correct length for %s', (fruit, expectedLength) =\u003e {\n  expect(fruit.length).toBe(expectedLength);\n});\n```\n\n**Vitest Example**\n\n```javascript\nimport { describe, it, expect } from 'vitest';\n\nit.each([\n  { input: 'hello', expected: 5 },\n  { input: 'world', expected: 5 },\n])('length of $input is $expected', ({ input, expected }) =\u003e {\n  expect(input.length).toBe(expected);\n});\n```\n\n**Dynamic Test Names**\n\nYou can also use dynamic test names derived from class method names:\n\n```javascript\nclass TestClass {\n  myFunction() {\n  }\n}\nit(TestClass.prototype.myFunction.name, () =\u003e {\n  expect(true).toBe(true);\n});\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e⌨️ Keyboard Shortcuts\u003c/b\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\n1. Open **Command Palette** → **Preferences: Open Keyboard Shortcuts (JSON)**\n2. Add the following shortcuts:\n\n```json\n{\n  \"key\": \"alt+1\",\n  \"command\": \"extension.runJest\"\n},\n{\n  \"key\": \"alt+2\",\n  \"command\": \"extension.debugJest\"\n},\n{\n  \"key\": \"alt+3\",\n  \"command\": \"extension.watchJest\"\n},\n{\n  \"key\": \"alt+4\",\n  \"command\": \"extension.runPrevJest\"\n}\n```\n\n\u003c/details\u003e\n\n## 🤝 Contributing\n\n**Want to start contributing features?** Check out our [open issues](https://github.com/firsttris/vscode-jest-runner/issues) to get started!\n\n### 🚀 Development Setup\n\n1. **Clone the repository**\n2. **Install dependencies**\n3. **Start debugging**\n   - Press `F5` or go to **Run** → **Start Debugging**\n   - A new VS Code window will open with the extension loaded\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made by the open source community**\n\n⭐ Star us on [GitHub](https://github.com/firsttris/vscode-jest-runner) • 🐛 [Report a Bug](https://github.com/firsttris/vscode-jest-runner/issues) • 💡 [Request a Feature](https://github.com/firsttris/vscode-jest-runner/issues)\n\n\u003c/div\u003e\n","funding_links":[],"categories":["Packages","TypeScript"],"sub_categories":["IDE"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirsttris%2Fvscode-jest-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirsttris%2Fvscode-jest-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirsttris%2Fvscode-jest-runner/lists"}