Visual Studio 2022 extension that shows Jest/Vitest/NYC code coverage in a dedicated tree window, inline in Solution Explorer, and line-by-line in the editor gutter.
This is a port of the CoverTree VS Code extension for Visual Studio.
Features
CoverTree Tool Window
A dedicated tree view (View > Other Windows > CoverTree) mirrors your project structure — folders and files, exactly as shown in Solution Explorer — with a coverage percentage and color-coded status dot on every node.
- 🟢 green — coverage at or above the threshold (default 75%)
- 🟡 yellow — coverage below the threshold
- Double-click a file to open it
Coverage files are discovered automatically: the extension recursively scans the whole solution/workspace for coverage-summary.json / coverage-final.json, wherever they live, skipping node_modules, .git, bin, obj, and similar noise directories. No manual path configuration needed.
Solution Explorer Integration
Every covered source file gets an expandable Coverage child row directly in Solution Explorer, showing the per-file breakdown (Lines / Functions / Branches).
Editor Gutter Markers
Open any covered file to see line-level coverage directly in the editor margin — green for covered, red for uncovered, yellow for partially covered branches.
Navigate Uncovered Lines
Alt+Shift+N / Alt+Shift+P jump straight to the next/previous uncovered line in the active file.
Status Bar
Overall coverage across all discovered files is shown in the status bar at all times.
Requirements
Your project must run Jest/Vitest/NYC with the json-summary (and, for gutter markers, json) coverage reporter enabled, then generate coverage data (npx jest --coverage or npx vitest run --coverage).
Works both with a Visual Studio Solution (.sln) and with File > Open Folder.
Configuration
Settings are available under Tools > Options > CoverTree: coverage threshold, file names to search for, and whether to show gutter markers.
License
MIT