Skip to content

Conversation

@mag123c
Copy link
Contributor

@mag123c mag123c commented Jan 18, 2026

This PR adds coverage and diagnostic output to the dot reporter in test_runner.

Currently, when using dot reporter with coverage enabled, if coverage threshold fails, the program exits with code 1 but prints nothing about why it failed. Users have no way to know what went wrong. The spec reporter already handles this correctly.

Changes:

  • dot.js: Added handling for test:diagnostic events (coverage threshold failure messages)
  • dot.js: Added handling for test:coverage events (coverage report table)

Now dot reporter behaves consistently with spec reporter for coverage output.

Fixes: #60884

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jan 18, 2026
When using the dot reporter with coverage enabled, coverage threshold
failures and coverage reports were not printed, only an exit code was
returned. This made it impossible to know why the test run failed.

This change adds handling for test:diagnostic and test:coverage events
to the dot reporter, matching the behavior of the spec reporter.

Fixes: nodejs#60884
@mag123c mag123c force-pushed the fix-dot-reporter-coverage branch from 83840c7 to 313a274 Compare January 18, 2026 06:34
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.52%. Comparing base (9bcfbeb) to head (313a274).

Files with missing lines Patch % Lines
lib/internal/test_runner/reporter/dot.js 33.33% 15 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61423      +/-   ##
==========================================
- Coverage   88.53%   88.52%   -0.01%     
==========================================
  Files         704      704              
  Lines      208883   208906      +23     
  Branches    40333    40336       +3     
==========================================
+ Hits       184926   184936      +10     
- Misses      15934    15947      +13     
  Partials     8023     8023              
Files with missing lines Coverage Δ
lib/internal/test_runner/reporter/dot.js 74.60% <33.33%> (-25.40%) ⬇️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_runner: print failed coverage reports with dot runner

2 participants