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

Function countWeightedRefs

packages/utils/src/lib/reports/utils.ts:151–155  ·  view source on GitHub ↗
(refs: CategoryRef[])

Source from the content-addressed store, hash-verified

149}
150
151export function countWeightedRefs(refs: CategoryRef[]) {
152 return refs
153 .filter(({ weight }) => weight > 0)
154 .reduce((sum, { weight }) => sum + weight, 0);
155}
156
157export function countCategoryAudits(
158 refs: CategoryRef[],

Callers 1

utils.unit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected