Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>Fast CoverageNew to Visual Studio Code? Get it now.
Fast Coverage

Fast Coverage

Lars Kreisz

|
1 install
| (0) | Free
High-performance code coverage highlighting using Istanbul JSON data
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Fast Coverage

VS Code Marketplace Version VS Code Marketplace Installs VS Code Marketplace Rating License: MIT

High-performance code coverage highlighting for VS Code using Istanbul JSON data (coverage-final.json).

Fast Coverage decorates covered and uncovered lines directly in the editor and shows the active file coverage percent in the status bar.

Animated Demo

The demo animation shows the status bar toggle switching from Coverage Off to an active percentage, with covered and uncovered line decorations appearing in the editor.

Features

  • Highlights covered lines in green and uncovered lines in red.
  • Shows per-file line coverage in the status bar.
  • One-click toggle from status bar or command palette.
  • Watches coverage files and refreshes decorations automatically.
  • Supports multiple coverage file glob patterns.

How It Works

  1. Fast Coverage finds Istanbul JSON files using fastCoverage.coverageFileGlobs.
  2. It merges entries from all matched coverage files.
  3. When enabled, it decorates visible editors based on statement hit counts.
  4. If coverage files change, the extension reloads data and updates decorations.

Requirements

  • VS Code 1.85.0+
  • A test setup that outputs Istanbul JSON coverage (for example coverage-final.json)

Quick Start

  1. Generate coverage JSON in your project.
  2. Open your project in VS Code.
  3. Run Fast Coverage: Toggle from the command palette.
  4. Use the status bar item labeled Coverage to turn highlighting on or off.

Generate coverage-final.json

Use whichever test runner you already have. Common examples:

Jest

npx jest --coverage

Vitest

npx vitest run --coverage

nyc + mocha

npx nyc --reporter=json mocha

If your coverage output file path is not matched by the default glob, update the extension setting below.

Configuration

fastCoverage.coverageFileGlobs

Array of glob patterns used to discover Istanbul JSON files.

Default:

["**/coverage-final.json"]

Example with multiple monorepo packages:

[
  "packages/*/coverage/coverage-final.json",
  "apps/*/coverage/coverage-final.json"
]

Commands

  • Fast Coverage: Toggle (fastCoverage.toggle)

Status Bar

When enabled, the status bar shows:

  • N/A when no coverage exists for the active file
  • NN% when coverage exists for the active file

Color meaning:

  • Green: 80%+
  • Yellow: 50-79%
  • Red: below 50%

Notes and Current Behavior

  • Coverage is computed from statement hit counts.
  • Decorations are line-based and whole-line.
  • In multi-root workspaces, relative coverage paths are resolved against the first workspace folder.
  • All files matching each configured glob are discovered (no hard cap).
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft