Skip to content

test_runner: exclude BRDA entries for ignored lines in lcov output#62440

Closed
JivinSardine wants to merge 1 commit intonodejs:mainfrom
JivinSardine:fix/coverage-ignore-brda
Closed

test_runner: exclude BRDA entries for ignored lines in lcov output#62440
JivinSardine wants to merge 1 commit intonodejs:mainfrom
JivinSardine:fix/coverage-ignore-brda

Conversation

@JivinSardine
Copy link

Description

When a line is marked with node:coverage ignore next, both the DA (line coverage) entry and the BRDA (branch coverage) entry for branches leading to that line should be excluded from the lcov output.

This matches the behavior of c8 and ensures that branch coverage percentages are not artificially reduced by ignored code.

Fixes

Fixes: #61586

Type of change

  • Bug fix (non-breaking change which fixes an existing issue)

Checklist

  • I have read the contribution guidelines
  • I have tested the changes (if applicable)
  • I have run the test suite (if applicable)

@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 Mar 26, 2026
When a line is marked with node:coverage ignore next, both the DA (line
coverage) entry and the BRDA (branch coverage) entry for branches leading
to that line should be excluded from the lcov output.

This matches the behavior of c8 and ensures that branch coverage
percentages are not artificially reduced by ignored code.

Fixes: nodejs#61586
@JivinSardine JivinSardine force-pushed the fix/coverage-ignore-brda branch from 487ce88 to 8d68d9d Compare March 26, 2026 08:21
@JakobJingleheimer JakobJingleheimer added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Mar 26, 2026
@JakobJingleheimer
Copy link
Member

Duplicate of #61598

@JakobJingleheimer JakobJingleheimer marked this as a duplicate of #61598 Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate Issues and PRs that are duplicates of other issues or PRs. 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

3 participants