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

Function scoreAuditWithTarget

packages/utils/src/lib/reports/scoring.ts:129–136  ·  view source on GitHub ↗
(
  audit: AuditOutput,
  scoreTarget: number,
)

Source from the content-addressed store, hash-verified

127 * @returns Audit with scoreTarget field
128 */
129export function scoreAuditWithTarget(
130 audit: AuditOutput,
131 scoreTarget: number,
132): AuditOutput {
133 return audit.score >= scoreTarget
134 ? { ...audit, score: 1, scoreTarget }
135 : { ...audit, scoreTarget };
136}
137
138/**
139 * Sets audit scores to 1 when targets are met.

Callers 2

scoreAuditsWithTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected