MCPcopy Create free account
hub / github.com/code-pushup/cli / calculateCoverage

Function calculateCoverage

packages/utils/src/lib/coverage-tree.ts:117–122  ·  view source on GitHub ↗
({ covered, total }: CoverageStats)

Source from the content-addressed store, hash-verified

115}
116
117function calculateCoverage({ covered, total }: CoverageStats): number {
118 if (total === 0) {
119 return 1;
120 }
121 return covered / total;
122}
123
124function aggregateChildCoverage(
125 nodes: FileTree[],

Callers 1

calculateTreeCoverageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected