CLI tool
jest-community/vscode-jest avatar
jest-community/vscode-jest

vscode-jest: Running and Debugging Jest Tests Inside VS Code

The optimal flow for Jest based testing in VS Code

2,891 stars309 forksTypeScriptMIT

At a glance

What is it?
The Jest extension for VS Code wires the Jest CLI into the Test Explorer, adds inline failure reporting and coverage highlighting, and can start a watch process the moment a workspace opens. It is a good fit for JavaScript and TypeScript projects that already have a runnable Jest configuration.
Who is it for?
Adopt vscode-jest if your project already has a runnable Jest configuration and you want test status, inline failures and coverage inside VS Code. Do not adopt it if you need a test runner that works without Jest, or if you expect the extension to configure Jest for you.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 8 months ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • jest-community/vscode-jest2,891 ★ · +1
Star history
Repository2026-10-012026-11-22
jest-community/vscode-jest2.9k2.9k

1 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What vscode-jest solves, and who it is for

Jest already works from a terminal. The problem vscode-jest addresses is the gap between the CLI output and the editor: you read a stack trace in one panel, find the file in another, and re-run the suite by hand after every edit. The extension moves that loop into VS Code. According to the README, it "supports full jest features in vscode environment to make testing more intuitive and fun" and "should work out-of-the-box for most common jest projects."

The intended user is a JavaScript or TypeScript developer who already has Jest configured and running. The README lists support for monorepo, react, react-native, angular and vue projects, which tells you the maintainers expect non-trivial setups rather than a single-package hobby repo. The package.json keywords include "multi-root ready", so workspaces with several folders are a named target. If you have never set up Jest, the README's first getting-started step is to do that separately, pointing at the Jest documentation. This extension is not a Jest installer or configurator.

How the extension finds and drives your Jest process

The mechanism is process-based, not a reimplementation of Jest. The extension locates a Jest command, spawns it, parses the output, and maps results back onto files and test names in the VS Code testing API. Nothing in the README suggests it evaluates your test files itself.

Discovery happens through activation events declared in package.json. The extension activates when a workspace contains a jest.config file with a js, ts, mjs, cjs or json extension, a jest.json file, node_modules/.bin/jest, node_modules/react-scripts/node_modules/.bin/jest, node_modules/react-native-scripts, or a .vscode-jest folder. That list is the honest answer to why the extension can appear inactive after installation: if none of those paths exist, the extension has no reason to start.

Once active, the README states that "if the extension can find the jest command, by default it will automatically run and monitor all tests in watch mode upon launch." Results surface in the Test Explorer and in editors. The extension can run "multiple jest processes within the same workspace folder", which is how monorepo layouts with several Jest roots are handled. The runMode setting controls when tests execute, and the README explicitly warns that different run modes "may have different performance implications, particularly for larger projects."

Installing vscode-jest and running a first test

Installation is through the VS Code extension view. Open Visual Studio Code, go to the extension view and search for "Jest", or open the Marketplace listing and click Install. The README's getting-started sequence is: set up Jest in your project, install the extension, then reload or restart VS Code.

There is no CLI install step for the extension itself, so the first real action is confirming that Jest runs from your project root. The extension ultimately shells out to a Jest command, so a broken local Jest install will look like a broken extension.

bash
yarn test

Run whatever your project's test script is. If that fails, fix Jest before touching the extension. If it passes, reload VS Code and check the Test Explorer for a populated tree.

When the auto-detected command is wrong, the README gives jest.jestCommandLine as the override. The example it uses is switching to yarn test:

json
{
  "jest.jestCommandLine": "yarn test"
}

Put that in your workspace settings. After a reload, the extension should drive the same command you would type by hand, and the Test Explorer should reflect its output. For projects where automatic watch mode is too expensive, the README points at jest.runMode to control when tests run, with the trade-off documented separately.

The runMode trade-off and the monorepo case

The README is unusually direct that run mode is a performance decision, not a preference. It notes that runMode "dictates the overall user experience, determining when tests should run, with or without coverage, error display style, etc." and that different modes "may have different performance implications, particularly for larger projects." It also observes that the right mode can change within one project: developers may prefer watch mode during light edits and on-demand mode "during heavy test development".

That is a real design tension. Watch mode gives fast feedback but keeps a Jest process alive and re-running, which on a large suite competes with your editor for CPU. On-demand mode is cheaper at rest but adds a manual step to every check. The extension exposes the choice rather than picking for you, and the README treats switching run mode per session as a normal workflow.

For monorepos, the README has a dedicated section on using the extension with monorepo projects, and the extension can run multiple Jest processes inside one workspace folder. The practical consequence is that rootPath and jestCommandLine matter more in a monorepo than in a single package: the extension needs to know which Jest root you mean. The README does not present monorepo support as automatic in every layout, and the existence of a how-to section implies configuration is expected.

Debugging, coverage and snapshots are the parts that justify the install

Three features go beyond showing pass and fail. The README lists debugging Jest tests in VS Code, viewing and updating snapshots interactively, and showing coverage information in files being tested. Package.json contributes a jest-snapshot language with grammars for .js.snap, .jsx.snap, .ts.snap and .tsx.snap files, so snapshot files get syntax highlighting rather than rendering as plain text.

Coverage is configurable through coverageFormatter and coverageColors, and the README has a section on reading and customizing the coverage scheme. That matters because the default coloring is a convention you may disagree with. Failures are reported inline at the expect function and in the problem inspector, which shortens the distance between reading a failure and editing the assertion.

There is also a debugging configuration path. The README documents Debug Config v2 as a separate section, which is the kind of thing that exists because the first iteration did not cover enough cases. If you rely on attaching a debugger to a specific test, read that section rather than assuming the default works for your setup.

Where vscode-jest is the wrong tool

The clearest limitation is the dependency on Jest. The extension parses Jest output and spawns a Jest command. If your project runs Vitest, Mocha, or a custom runner, this extension has nothing to attach to, and no setting in the README changes that.

The second limitation is discovery. Activation depends on one of a fixed set of paths existing. A project that generates its Jest config at runtime, or keeps it outside the workspace, may not trigger activation at all. The README's troubleshooting section has an entry titled "I don't see 'Jest' in the bottom status bar", which confirms this is a real failure mode users hit rather than a theoretical one.

Third, the README acknowledges intermittent environment problems: there is a troubleshooting entry for "(npm/yarn/node) command not found during test run or debugging". If your editor's shell environment differs from your terminal's, the extension can fail to find the same binaries you use by hand. There is also a "Long Running Tests Warning" entry, which implies the extension can detect a run that is taking too long rather than silently waiting forever.

Finally, automatic watch mode is opt-in by default and can be wrong for a large suite on a constrained machine. The README's own performance section and the runMode trade-off discussion are the maintainers telling you this. If you want a runner that only executes the test under the cursor with no background process, this extension's default behavior is the opposite of what you want.

Alternative: vscode-jest-runner and running Jest in the terminal

The related searches around this extension include "vscode jest runner" and "Firsttris vscode-jest-runner", which points at a genuinely different approach. vscode-jest maintains a Jest process and reflects its output into the Test Explorer as a live view. vscode-jest-runner, by contrast, is a run-and-forget style runner: you invoke it on a file or a test and it executes that scope, without maintaining a watch process or a persistent test tree.

The difference matters for machine load and for mental model. A persistent watch process gives you continuous status at the cost of background CPU. A per-invocation runner gives you a clean process per run at the cost of not knowing the suite state until you ask. Neither is strictly better; they answer different questions.

The third alternative is the terminal, which the related searches also reflect ("How to run jest tests in VSCode Terminal"). That has zero configuration and zero extension overhead, and it is the right answer if you only need to run tests occasionally. The reason to install vscode-jest is that you want failures, coverage and snapshots surfaced where you edit, and you are willing to configure jestCommandLine and runMode to get it.

Maintenance, upgrades and the MIT licence

The repository is not archived. The last push was on 2026-03-20, and the most recent release listed is v6.4.4 from 2025-06-29, with v6.4.3 and a v6.4.2-next before it. The release notes directory and the README's Releases section both point at versioned notes, and the README explicitly says "For detailed releases and migration help, please see releases." That is the upgrade path: read the release note for the version you are moving to before updating, because the extension has shipped breaking configuration changes across major versions, which is why Debug Config v2 exists as a distinct documented format.

The extension requires VS Code ^1.88.1 per package.json, so an old editor is a hard blocker. It is published under the MIT licence, with the LICENSE file at the repository root. MIT is permissive: it allows use, modification and redistribution with the licence text retained. That is a statement about the licence terms, not legal advice; if you redistribute the extension inside a product, have your own counsel review the notice requirements.

Upgrade cost is mostly configuration drift. Settings such as jestCommandLine, runMode, rootPath and the coverage options are the surface area you may need to revisit after a major version. The README also documents a setup-wizard.md file at the repository root, which suggests the project offers guided configuration for at least some setups.

Editorial conclusion

Adopt vscode-jest if your project already has a runnable Jest configuration and you want test status, inline failures and coverage inside VS Code. Do not adopt it if you need a test runner that works without Jest, or if you expect the extension to configure Jest for you. Before rolling it out to a team, verify that the jest command the extension auto-detects is the one you actually want, then set jest.jestCommandLine explicitly and check the runMode trade-off on your largest test suite.

Frequently asked questions

What is orta vscode jest?

It is the Jest extension for Visual Studio Code published under the publisher name Orta, with the display name Jest. The repository lives at jest-community/vscode-jest, and package.json lists Orta Therox, ConnectDotz and Sean Poulter as authors.

How do I run Jest tests inside VS Code with vscode-jest?

Install the Jest extension from the extension view, reload VS Code, and the extension will run and monitor tests in watch mode by default if it can find the jest command. Results appear in the Test Explorer and in editors.

How do I stop vscode-jest from running tests automatically?

The README points at the runMode setting to control when the extension runs tests, and notes that automatic watch mode is the default when a jest command is found. Different run modes have different performance implications, especially on larger projects.

Why is Jest not showing in the VS Code status bar?

The README has a troubleshooting entry for exactly this case. Activation depends on the workspace containing one of the known Jest paths, such as a jest.config file, jest.json, or node_modules/.bin/jest, so a project without those will not activate the extension.

Can vscode-jest debug tests and show coverage?

Yes. The README lists debugging Jest tests in VS Code and showing coverage information in files being tested among the features, and documents Debug Config v2 plus coverageFormatter and coverageColors settings.

Official sources

  1. Issues
  2. jest-community/vscode-jest on GitHub
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/jest-community-vscode-jest.svg)](https://hysenlabs.com/projects/jest-community-vscode-jest)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/jest-community-vscode-jest.svg)](https://hysenlabs.com/projects/jest-community-vscode-jest)

Was this useful?