feat(diff-coverage): enhance coverage reporting for multi-line statements and branches (#33516)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
Coding On Star
2026-03-16 15:09:46 +08:00
committed by GitHub
parent a01c384f5b
commit 7daec9717d
3 changed files with 66 additions and 4 deletions

View File

@@ -338,8 +338,8 @@ function buildSummary({
}
lines.push(`Changed source files checked: ${changedSourceFiles.length}`)
lines.push(`Changed statement coverage: ${percentage(diffTotals.statements.covered, diffTotals.statements.total).toFixed(2)}%`)
lines.push(`Changed branch coverage: ${percentage(diffTotals.branches.covered, diffTotals.branches.total).toFixed(2)}%`)
lines.push(`Changed statement coverage: ${formatDiffPercent(diffTotals.statements)}`)
lines.push(`Changed branch coverage: ${formatDiffPercent(diffTotals.branches)}`)
return lines
}