Skip to content

feat(lsp): support test coverage visualization#35197

Open
dmthong181096 wants to merge 1 commit into
denoland:mainfrom
dmthong181096:lsp-test-coverage
Open

feat(lsp): support test coverage visualization#35197
dmthong181096 wants to merge 1 commit into
denoland:mainfrom
dmthong181096:lsp-test-coverage

Conversation

@dmthong181096

@dmthong181096 dmthong181096 commented Jun 13, 2026

Copy link
Copy Markdown

/claim #18147

Description

This pull request implements native test coverage visualization in Deno's LSP by adding support for the custom deno/testCoverage notification (resolves #18147). This allows editor extensions (such as the Deno VS Code extension) to render line coverage gutters.

Key Changes

  1. LSP Customs & Client: Added TestCoverageNotification types and routing in the client notification dispatcher.
  2. Deno Coverage Tools: Refactored the core parsing logic of the coverage tool into collect_coverage_reports to allow programmatic in-memory collection of results (retaining accurate sourcemap translations to original TypeScript source lines).
  3. LSP Execution: Modified the test run execution flow to collect coverage raw profiles into a temporary directory during kind: "coverage" runs, parse them asynchronously, and dispatch the line hit counts to the editor.
  4. Integration Tests: Added lsp_testing_api_coverage in tests/integration/lsp_tests.rs to verify that executing tests with the coverage option correctly emits notifications containing line coverage hit counts.

Verification

  • Verified by running the integration test suite:
    cargo test -p integration_tests lsp_testing_api

@deno-cla-assistant

deno-cla-assistant Bot commented Jun 13, 2026

Copy link
Copy Markdown

Deno Individual Contributor License Agreement

All contributors have signed the CLA. Thank you!

Re-run CLA check


This is an automated message from CLA Assistant

@dmthong181096

Copy link
Copy Markdown
Author

/try

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.

feat: view test coverage in editor

1 participant