Skip to content

Commit c232fff

Browse files
committed
Floor (not round) the post-filter totals in HTML report
When a user filters the file table, the totals row re-renders via updateTotalsCell, which used Float#toFixed(2) — rounding 763/777 to 98.20%. The initial render uses fmtPct, which floors. Switch the filter-update path to fmtPct so a user who sets minimum_coverage to the displayed number doesn't get a failing run on the next pass. Resolves #1115.
1 parent c13b9e4 commit c232fff

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

html_frontend/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ function updateCoverageCells(
719719
const p = (covered * 100.0) / total;
720720
const cls = pctClass(p);
721721
if (covCell) {
722-
covCell.innerHTML = `<div class="coverage-cell">${renderCoverageBar(p)}<span class="coverage-pct">${p.toFixed(2)}%</span></div>`;
722+
covCell.innerHTML = `<div class="coverage-cell">${renderCoverageBar(p)}<span class="coverage-pct">${fmtPct(p)}%</span></div>`;
723723
covCell.className = `${covCell.className.replace(/green|yellow|red/g, '').trim()} ${cls}`;
724724
}
725725
if (numEl) numEl.textContent = fmtNum(covered) + '/';

0 commit comments

Comments
 (0)