Uh oh!
There was an error while loading. Please reload this page.
fix/coverage-ignore-brda-61586 - #62264
Conversation
nodejs-github-bot
commented
Mar 15, 2026
Review requested:
|
avivkeller
commented
Mar 15, 2026
@PradSharma554 can you please give your PR a proper description explaining what/why/how? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #62264 +/- ##
==========================================
+ Coverage 89.65% 89.68% +0.02%
==========================================
Files 676 676 Lines 206546 206575 +29 Branches 39558 39560 +2 ==========================================
+ Hits 185179 185260 +81 + Misses 13485 13451 -34 + Partials 7882 7864 -18
🚀 New features to boost your workflow:
|
PradSharma554
commented
Mar 16, 2026
Okay |
PradSharma554
commented
Mar 16, 2026
@avivkeller Can you review it now? |
JakobJingleheimer
commented
Mar 16, 2026
Duplicate of#61598 |
PradSharma554
commented
Mar 16, 2026
then shall i not work on this? |
The cited PR was the first one and the furthest along. So, I would guess probably not? Also, there are like 5 other PRs to fix this issue—probably best to check that before starting 🙂 (they're all linked to/from the hug report) |
PradSharma554
commented
Mar 16, 2026
Okay! I'll pick up something else |
Summary
Fixes#61586
/* node:coverage ignore next */ comments were not properly excluding branches from LCOV coverage output. When a branch was ignored, the LCOV reporter still emitted BRDA entries with count=0, causing BRF (branches
found) to exceed BRH (branches hit) even though the uncovered code was supposed to be ignored.
Root Cause
V8's block coverage ranges for branches can include structural elements like closing braces (}) that belong to the parent scope. The existing check range.ignoredLines === range.lines.length fails in this case
because the closing brace line isn't marked as ignored — it's covered by the parent function range.
For example:
V8's false branch range spans from return 'falsy' to }. Since } isn't ignored, ignoredLines !== lines.length, so the branch wasn't excluded.
Fix
This handles the case where V8's branch range includes structural lines covered by the parent range, but the actual uncovered code is all on ignored lines.
Test Coverage