Skip to content

test_runner: add support for --test-coverage-include-all - #64830

Open
avivkeller wants to merge 2 commits into
nodejs:mainfrom
avivkeller:test-coverage-include-all
Open

test_runner: add support for --test-coverage-include-all#64830
avivkeller wants to merge 2 commits into
nodejs:mainfrom
avivkeller:test-coverage-include-all

Conversation

@avivkeller

Copy link
Copy Markdown
Member

Add s a CLI option to include source files that were never loaded by the test run in the coverage
report, where they are reported as having zero coverage. Candidate files are searched for in the current working directory, and are subject to the same --test-coverage-include and --test-coverage-exclude filtering as the rest of the report.

As discussed during today's @nodejs/test_runner meeting with @ljharb and @JakobJingleheimer

Signed-off-by: avivkeller <me@aviv.sh>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jul 29, 2026
Comment thread doc/api/cli.md Outdated
Comment thread doc/node.1 Outdated
Co-authored-by: Aviv Keller <me@aviv.sh>
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.21429% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.12%. Comparing base (b2a024b) to head (8a951bb).
⚠️ Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/coverage.js 12.24% 43 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64830      +/-   ##
==========================================
- Coverage   90.15%   90.12%   -0.04%     
==========================================
  Files         744      746       +2     
  Lines      242542   242819     +277     
  Branches    45690    45741      +51     
==========================================
+ Hits       218672   218836     +164     
- Misses      15362    15463     +101     
- Partials     8508     8520      +12     
Files with missing lines Coverage Δ
lib/internal/test_runner/runner.js 94.44% <100.00%> (+0.01%) ⬆️
lib/internal/test_runner/utils.js 66.35% <100.00%> (+0.09%) ⬆️
src/node_options.cc 76.62% <100.00%> (-0.08%) ⬇️
src/node_options.h 98.01% <100.00%> (+0.50%) ⬆️
lib/internal/test_runner/coverage.js 59.57% <12.24%> (-2.96%) ⬇️

... and 84 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.

@avivkeller avivkeller added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jul 30, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 30, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@avivkeller avivkeller added semver-minor PRs that contain new features and should be released in the next minor version. commit-queue Add this label to land a pull request using GitHub Actions. labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue Add this label to land a pull request using GitHub Actions. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants