All files / apps/developer-portal/layers/health/app/utils coverage.ts

100% Statements 3/3
100% Branches 4/4
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 122x         132x            
export const COVERAGE_METRICS = ["lines", "statements", "functions", "branches"] as const;
 
type CoverageMetricName = (typeof COVERAGE_METRICS)[number];
 
/** One table cell: the percentage as a meter width, a label and its tone class. */
export const coverageCell = (key: CoverageMetricName, pct: number | null | undefined) => ({
    key,
    pct: pct ?? 0,
    label: dash(pct, "%"),
    tone: toneClass(coverageTone(pct ?? null)),
});