We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5caffef commit 9be6d80Copy full SHA for 9be6d80
1 file changed
lib/internal/test_runner/coverage.js
@@ -198,18 +198,13 @@ class TestCoverage {
198
continue;
199
}
200
201
- // If the branch is uncovered but contains ignored lines, treat it as
202
- // covered. This matches the behavior of tools like c8 and ensures that
203
- // ignored code doesn't penalize branch coverage.
204
- const branchCount = (range.count === 0 && range.ignoredLines > 0) ? 1 : range.count;
205
-
206
ArrayPrototypePush(branchReports, {
207
__proto__: null,
208
line: range.lines[0]?.line,
209
- count: branchCount,
+ count: range.count,
210
});
211
212
- if (branchCount !== 0) {
+ if (range.count !== 0) {
213
branchesCovered++;
214
215
0 commit comments