FileCoverageinterfaceno test imports itinterface FileCoverageThe lines of one file that the tests reach.
| Member | Type | What it is |
|---|---|---|
path | string | From the root of the repository. |
found | number | |
hit | number |
The line coverage of a library's tests (docs 0001-docs FR-022): parseLcov reads the LCOV file that bun test --coverage writes into the files of one library, parseCoverage reads what tools/evidence.ts --coverage keeps of it, and percent is the share of lines hit. Source files only: tests, and what is under node_modules, are left out.
FileCoverageinterfaceno test imports itinterface FileCoverageThe lines of one file that the tests reach.
| Member | Type | What it is |
|---|---|---|
path | string | From the root of the repository. |
found | number | |
hit | number |
LibraryCoverageinterfaceno test imports itinterface LibraryCoverageThe coverage of one library.
| Member | Type | What it is |
|---|---|---|
library | string | |
files | readonly FileCoverage[] |
parseCoveragefunctionfunction parseCoverage(text: string): { readonly value: LibraryCoverage; } | { readonly error: string; }What tools/evidence.ts --coverage kept, or why it cannot be read.
parseLcovfunctionfunction parseLcov(lcov: string, base: string): readonly FileCoverage[]The files of an LCOV text: each SF: begins a file and LF: and LH: give its lines found and hit; base is what the SF: paths are relative to, from the root of the repository.
percentfunctionfunction percent(files: readonly { readonly found: number; readonly hit: number; }[]): number | undefinedThe share of lines hit, 0 to 100, or undefined where there are no lines.