Skip to content

Comments

test_runner: print coverage and diagnostics with dot reporter#61891

Open
madkate42 wants to merge 2 commits intonodejs:mainfrom
madkate42:fix-dot-reporter-coverage
Open

test_runner: print coverage and diagnostics with dot reporter#61891
madkate42 wants to merge 2 commits intonodejs:mainfrom
madkate42:fix-dot-reporter-coverage

Conversation

@madkate42
Copy link

@madkate42 madkate42 commented Feb 19, 2026

Summary

When using the dot reporter with coverage thresholds, coverage failure messages and the coverage report were not displayed. The dot reporter only handled test:pass and test:fail events, ignoring test:diagnostic and test:coverage events.

This change adds handlers for these events, displaying:

  • Diagnostic messages (including coverage threshold errors)
  • The coverage report table

after the test dots complete.

Fixes: #60884
Refs: #52655

Test plan

  • Added tests in test/parallel/test-runner-coverage-thresholds.js for dot reporter coverage failures
  • Existing dot reporter tests continue to pass

   diagnostics with dot reporter
@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 Feb 19, 2026
@madkate42 madkate42 closed this Feb 19, 2026
@madkate42 madkate42 deleted the fix-dot-reporter-coverage branch February 19, 2026 21:15
@madkate42 madkate42 restored the fix-dot-reporter-coverage branch February 19, 2026 21:29
@madkate42 madkate42 reopened this Feb 19, 2026
fixture,
]);

const stdout = result.stdout.toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a snapshot test too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch, thank you, added in this commit.
let me know if this could be improved!

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

3 participants