Skip to content

feat: add test coverage visualization - #1389

Open
bookenjoyer67 wants to merge 1 commit into
denoland:mainfrom
bookenjoyer67:feat/test-coverage-visualization
Open

feat: add test coverage visualization#1389
bookenjoyer67 wants to merge 1 commit into
denoland:mainfrom
bookenjoyer67:feat/test-coverage-visualization

Conversation

@bookenjoyer67

@bookenjoyer67 bookenjoyer67 commented Jul 25, 2026

Copy link
Copy Markdown

Adds client-side support for the deno/testCoverage LSP notification, enabling visual coverage feedback directly in the editor.

This creates a Run with Coverage profile in the Test Explorer. When tests finish, the extension receives coverage data from the LSP and:

  • Highlights covered lines with a green background (using diffEditor.insertedTextBackground)
  • Highlights uncovered lines with a red background (using diffEditor.removedTextBackground)
  • Shows an overview in the ruler lane for quick navigation
  • Displays a summary message with the average coverage percentage

The decorations update automatically when switching between editor tabs.

Changes:

  • client/src/lsp_extensions.ts — New types: FileCoverage, CoverageNotificationParams, and the testCoverage notification
  • client/src/testing.ts — Coverage handling in DenoTestController, reusing existing test run infrastructure

Requires: denoland/deno#36314

Adds client-side support for the 'deno/testCoverage' LSP notification,
enabling visual coverage feedback directly in the editor.

- Creates a 'Run with Coverage' profile in the Test Explorer
- Highlights covered lines with green background
- Highlights uncovered lines with red background
- Shows ruler lane overview markers
- Displays summary with average coverage percentage
- Decorations update automatically when switching editor tabs

Requires the corresponding LSP changes in denoland/deno.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Book-Enjoyer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants