Lupa API Reference / @pawel-up/lupa/runner / CoverageOptions
Interface: CoverageOptions
Defined in: src/runner/types.ts:373
Options for configuring code coverage instrumentation
Properties
enabled?
optionalenabled?:boolean
Defined in: src/runner/types.ts:378
Whether to enable code coverage collection. Defaults to false.
exclude?
optionalexclude?:string[]
Defined in: src/runner/types.ts:390
Array of glob patterns to exclude from coverage reports. Files matching these patterns will be skipped during coverage mapping.
extension?
optionalextension?:string[]
Defined in: src/runner/types.ts:396
Array of file extensions to process (e.g., ['.js', '.ts', '.jsx', '.tsx', '.vue']). Only files with these extensions will be included in the coverage report.
include?
optionalinclude?:string[]
Defined in: src/runner/types.ts:384
Array of glob patterns to include in coverage reports. Files matching these patterns will be included in the coverage mapping.
reporters?
optionalreporters?:string[]
Defined in: src/runner/types.ts:402
List of coverage reporters to run simultaneously (e.g., ['text', 'html', 'lcov']). Defaults to ['text', 'html'] if not specified.
reportsDirectory?
optionalreportsDirectory?:string
Defined in: src/runner/types.ts:408
The output directory where the coverage reports will be written. Defaults to './coverage'.
thresholds?
optionalthresholds?:object
Defined in: src/runner/types.ts:414
Coverage threshold gates. If the coverage percentages fall below these thresholds, the test run will fail with an exit code of 1.
branches?
optionalbranches?:number
functions?
optionalfunctions?:number
lines?
optionallines?:number
statements?
optionalstatements?:number