Live Test Runner

Save a file → the affected Jest or Vitest tests run → results show up in the editor. You don't need a terminal or any config changes.

⚡Reruns on saveOnly the tests affected by the file you saved.
🌳Test treeFile → suite → test, ready before the first run.
🎯Editor feedbackGutter icons, inline durations, Run / Debug buttons.
📊Live coveragePer-line bars, plus a hover that shows covering tests.
🔍Results panelTest list · console output · errors.
⏱Timeline (preview)Step through a test after it has run.

Quick start

  1. Open a Jest or Vitest project — a single folder, a monorepo or a multi-root workspace (see Monorepos).
  2. Click the beaker icon in the Activity Bar. Tests are discovered right away.
  3. Click ▶ Start Testing. The full suite runs once.
  4. Edit and save. The affected tests rerun automatically.
Nothing runs in the background until you start a session. Stop ends it. Shift-click Stop (or Shift+Delete in the views) also clears the cache.

Test Explorer

Shows the sidebar tree of every test file, suite and test.

Test files match *.test.* or *.spec.* with js, ts, jsx, tsx, mjs or cjs. node_modules is skipped.

Reruns on save

You save…What runs
A test fileThat whole file.
A source file with trace dataOnly the tests that executed that file (suites with shared state run as a whole).
A source file with no trace datajest --findRelatedTests, which uses Jest's import graph.

Editor integration

WhereWhat you see
Gutter✓ passed · ✗ failed · ⟳ running · ○ pending / skipped
After the lineTest / suite duration, colour-coded by durationThresholds
CodeLens▶ Run this test or suite · ▷ Debug · ◈ Results jumps to it in the panel
Status barLive Tests: ✅ 12 passed. Click it to open the panels.

Results panel

Opens in the bottom panel and has three columns: test list · console output (tabs per level: log / info / warn / error) · errors.

Code coverage

Coverage is collected during normal runs. There's no extra pass or command.

BarMeaning
▌ greenCovered
▌ amberPartially covered (some branches missed)
▌ redNever executed
▌ greyNot executable

Debugging

▷ Debug starts a VS Code Node debug session for exactly that test or suite: Jest runs in band, Vitest runs with --no-file-parallelism and no timeouts (child processes attach automatically). Breakpoints in tests and source files work as usual.

Vitest

Vitest projects work like Jest ones: open the folder, click ▶ Start Testing. The framework is detected from the project (a vitest dependency or a vitest.config.*, and no Jest config).

Monorepos & multi-root workspaces

Every test project in the workspace is detected when you open it. None runs until you start it.

Your layoutProjects
A folder with its own test config (jest.config.*, vitest.config.*, package.json#jest, CRA)One project — its config already covers its packages (Jest projects, Vitest test.projects)
A monorepo root (pnpm-workspace.yaml, package.json#workspaces) without a test configOne project per package that has tests (a Jest / Vitest dependency, config or test script)
A multi-root workspaceEach folder, by the rules above

The project switcher: the shared package is shown while two packages run

Jest and Vitest in one project

A project with a Jest config and its own vitest.config.* (e.g. while migrating) runs each test file with its own framework — binary, config, flags, coverage. A vitest dependency alone, or a vite.config.*, does not count: such projects stay Jest.

Which framework runs a file
1. liveTestRunner.frameworksThe first matching glob wins, e.g. { "packages/new/**": "vitest" }. Also makes a Jest project without a Vitest config mixed.
2. The configsOnly the Jest config lists it → Jest; only the Vitest config → Vitest.
3. The fileBoth list it: an import from vitest or a vi. call → Vitest; @jest/globals or a jest. call → Jest. Read again when you save the file.
4. Nothing saysThe project's main framework (Jest), with one warning in the log naming the setting.

A mixed project: Explorer grouped into Jest and Vitest, status bar Jest 5 · Vitest 3

math.js covered by Jest (add) and Vitest (mul)

Timeline Debugger (preview)

Re-runs one test with full instrumentation, then lets you replay it step by step. Jest only — not available for Vitest yet.

Open it from a test in the Results panel. Leave it with the exit button.

Commands

Command Palette → type Live Test Runner.

CommandDoes
Start TestingRuns everything and starts watching for saves
Stop TestingEnds the session and kills running Jest / Vitest processes
Stop Testing and Clear CacheStop, then wipe the discovery cache (Shift+Delete in the views)
Clear Cache and Restart TestingWipe the results and cache, rediscover tests and run them all again
Select ProjectSwitch the project the views show (the Explorer's switcher row)
Select Project RootPin Live Test Runner to one folder, or back to every detected project
Stop All ProjectsStops every running project
Show LogsOpens the Live Test Runner log (levelled)
Show Test OutputOpens the raw Jest / Vitest output
Open GuideOpens this guide in an editor tab
Copy Diagnostic ReportCopies versions, project setup, settings and recent logs for a bug report
Open Timeline DebuggerTraces a single test
Show All Covering TestsQuick Pick of every test that ran a line
Dump Trace Store (devMode)Prints the internal trace indexes

Settings

All under liveTestRunner.*.

SettingDefaultWhat it does
projectRoot""Pin to one project folder. Empty: every test project in the workspace is detected.
maxRunningProjects"auto"Projects running at once: auto = 2 (1 on ≤ 4 cores or < 8 GB total memory), or a number
runModeautoauto calls Jest directly. npm uses npm test -- (Jest only).
jestCommand""Override the Jest binary or command.
vitestCommand""Override the Vitest command (e.g. npx vitest). Empty = the project's own Vitest.
frameworks{}Jest + Vitest projects: glob → "jest" / "vitest", which framework runs those test files (see Jest and Vitest in one project).
vitestTracetrueVitest execution trace: covering tests in the hover, and a saved source file reruns only the tests that ran it. Off: Vitest runs exactly as configured and saves use vitest related.
vitestIncludeBrowserProjectsfalseAlso run Vitest browser-mode projects. They need real browsers, so they are left out by default (unless the test script picks projects itself).
onSaveDebounceMs300Wait after a save before running.
durationThresholds.*100 / 500 ms …When test, suite and file durations turn amber or red.
coverageThresholds.red / amber50 / 80Coverage % colour bands.
devModefalseEnables developer commands.

Logs & troubleshooting

Two output channels

ChannelContainsUse it to…
Live Test RunnerThe extension's own log: timestamps, levels, one summary per runFind out what the extension did and why
Live Test Runner: Test OutputJest's raw output, ANSI-free, each line tagged [jest#N]See what Jest printed

Levels

error something broke and needs action · warning degraded but recovered (fallbacks, files that failed to run) · info milestones and run summaries · debug / trace details, hidden by default

Change the level: Output panel → pick Live Test Runner → ⚙ → Set Log Level. Or Command Palette → Developer: Set Log Level…. The level also applies inside the Jest process, so debug detail from instrumentation shows up too.

Reading a session

[info] [Extension] Live Test Runner v2.0.3 · VS Code 1.95.0 · win32-x64 · Node 20.18.0
[info] [Extension] Project root: c:\work\shop
[info] [Discovery] Discovered 412 test(s) in 58 file(s) in 0.9s (55 from cache, 3 parsed)
[info] [Session] Session started — 58 test file(s) · framework: jest · root: c:\work\shop
[info] [Session] Run #1 full suite — 58 file(s) · 409 passed · 3 failed · 21.4s — failing: cart.test.ts
[info] [Session] Run #2 save cart.ts — 2 file(s) · 31 passed · 0 failed · 2.2s

Common warnings

MessageMeaning / what to do
instrumented Jest run returned no results … Jest said:Jest failed before running tests (config, transform, environment). The lines after it are Jest's own error. Often a config format we don't read yet (BUG-07).
falling back to plain Jest, one file at a timeTests still run, but more slowly and without coverage or smart reruns for those files.
<file> failed to run — …The test file could not execute (syntax error, missing module, setup crash).
could not instrument <file>That source file runs without coverage. Set the level to Debug to see the parse error.
falling back to "npx jest"No local Jest found. Run npm install or set jestCommand.
no file has finished in 60s — … currently on XA batch made no progress. If the next warning names a different file, tests are just slow. If it names the same file, a test there is probably hanging (BUG-23).
… was still running in b3 — cancelling b3A save reran a file that a bigger batch was running. That batch's unfinished files are retried, more slowly.
Trace finished … captured 0 stepsThe timeline matched no test, or the transform didn't apply (BUG-12).

Reporting a bug

  1. Set the log level to Debug and reproduce the problem.
  2. Run Copy Diagnostic Report. It opens and copies a Markdown report with versions, project setup and the last 300 log lines.
  3. Check it for anything private, then attach it to the issue.

Support & limits

Jest covers babel-jest, ts-jest and @swc/jest; Create React App (react-scripts 4 / 5) has its Jest config extracted automatically. Vitest 3+ is fully supported, Vitest 1–2 run with results only; the framework is detected from the project (a project that lists Vitest but configures Jest runs on Jest).

Any UI framework. React, Preact, Solid, Lit, Angular and Qwik code is plain JS / TS. Vue, Svelte, Astro and Marko components are compiled by your project's own Jest transformer (vue-jest, svelte-jester…) or Vite plugin, and the extension maps them back to their own lines: saving a component reruns the tests that use it, the coverage hover lists the tests that ran each of its lines, and coverage counts it (an untested component counts from its <script>). Other file types count too when your tests load them — an Angular templateUrl, an HTML file imported with ?raw, a template a plugin reads: saving one reruns the tests that use it. More generally: any extension in your Jest config's moduleFileExtensions (e.g. Angular .html templates) reruns its tests on save, and the Vitest trace reaches any file a Vite plugin compiles. With Jest, coverage of a Vue component counts its <script> block only (as jest --coverage does — vue-jest maps only that), but template lines still show the tests that rendered them. Jest's ESM mode is picked up from your test script (NODE_OPTIONS=--experimental-vm-modules jest) or .npmrc (node-options=--experimental-vm-modules) — needed for ESM-only projects and Svelte 4+ with svelte-jester; if a file still fails to load as an ES module, the log says what to change.

FeatureJestCRAVitest
Run & pass/fail✅✅✅
▶ Run / ▷ Debug one test or suite✅✅✅
Rerun a saved test file✅✅✅
Logs / console output✅ per file✅ per file✅ per test
Coverage (gutter, hover)✅✅✅ needs @vitest/coverage-v8 (or -istanbul)
Live per-file progress✅✅✅
Rerun tests related to a saved source file✅✅✅ only the tests that ran it (execution trace); vitest related when the trace is off
Monorepo / multi-project (project switcher)✅ one project per package; a root projects config stays one🟡 a CRA app is detected as a package (not e2e-tested)✅ one project per package; test.projects stays one, grouped by name
Mixed Jest + Vitest in one project✅ each test file runs with its own framework—✅
Execution trace / "covering tests"✅✅✅ Vitest ≥ 3 (incl. vitest.workspace files); not in browser mode
UI components (.vue, .svelte, .astro, .marko): save reruns, trace, coverage✅ through the project's transformer (vue-jest, svelte-jester…)— (React is plain JS)✅ through the project's Vite plugins
Timeline debugger⏳⏳⏳ later

How a run works

TriggerStart, save, or ▶ Run
→
SessionManagerPicks the files or tests and splits them into batches
→
Jest child processTemp config + trace transform + live reporter
→
StoresResultStore · CoverageStore · ExecutionTraceStore
→
ObserversExplorer · Results · gutter · coverage

Where things appear in VS Code

Activity Bar → Explorer
Editor: gutter icons · durations · CodeLens · coverage bars · hover
Panel: Results / Timeline · Output (Logs, Test Output)
Status bar: Live Tests: ✅ 12 passed

Architecture

PackageRoleDepends on
runnerSpawns Jest, detects the framework (Jest / CRA), resolves the binary, parses results, shared logger—
coreSession lifecycle, coverage maprunner
vscode-extensionUI, stores, instrumentation, VS Code wiringcore

More detail: architecture.md · developer-guide.md

Known issues

All known bugs, with root-cause analysis and suggested fixes, are tracked in bugs-and-issues.md. The open ones: