f
buildHtml(rows: FileRow[]): string
Builds a self-contained HTML report: a summary table plus per-file source with line coloring.
f
buildLcov(rows: FileRow[]): string
Builds a standard LCOV lcov.info string (line coverage only: DA/LF/LH per file).
f
buildRows(): FileRow[]
collector: CoverageFileMap,
testFiles: Set<string>,
projectRoot: string
Turns the raw coverage map into sorted, test-file-filtered rows with computed percentages.
f
write(): Promise<void>
config: Config,
testFiles: string[]
Renders the run's accumulated coverage: always prints the terminal summary, then writes the
lcov/html reports the user requested via config.coverageFormats. testFiles (the run's
test entry paths) are excluded so the report reflects the code under test, not the tests.
Usage
import * as mod from "lib/coverage/report.ts";