Skip to content

test_runner: exclude branches leading to ignored lines from lcov output#61894

Open
realMelTuc wants to merge 3 commits intonodejs:mainfrom
realMelTuc:fix/coverage-ignore-branches
Open

test_runner: exclude branches leading to ignored lines from lcov output#61894
realMelTuc wants to merge 3 commits intonodejs:mainfrom
realMelTuc:fix/coverage-ignore-branches

Conversation

@realMelTuc
Copy link

When a line is ignored with /* node:coverage ignore next */, branches leading to that line should also be excluded from the lcov output.

Previously, the branch entries (BRDA) were still being output even for branches that led to ignored lines, causing incorrect branch coverage calculations.

This fix filters out branches whose target line is not in the included lines set (i.e., lines that were ignored), and updates the branch count summaries accordingly.

Fixes: #61586

OpenClaw Agent and others added 3 commits February 19, 2026 17:51
Previously, the test runner accessed process.argv and process.cwd()
directly in runner.js. This change captures these values in
test_runner.js (the entry point) and passes them through the options
object to runner.js.

Fixes: nodejs#53867
- Change 'seperately' to 'separately'
- Change 'paramater' to 'parameter'

These are documentation fixes in the changelog files.
When a line is ignored with , branches
leading to that line should also be excluded from the lcov output.
Previously, the branch entries (BRDA) were still being output even for
branches that led to ignored lines, causing incorrect branch coverage
calculations.

This fix filters out branches whose target line is not in the included
lines set (i.e., lines that were ignored), and updates the branch count
summaries accordingly.

Fixes: nodejs#61586
@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
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: node:coverage ignore comments exclude DA but leave BRDA in lcov output

2 participants

Comments