c8js • Docs
Function: report()
report(
options
?):Promise
<CoverageMap
>
Generates a coverage report and optionally checks that code coverage is within the specified thresholds.
Parameters
• options?: Options
& Partial
<Options
>
Options for the function.
Returns
Promise
<CoverageMap
>
A promise that resolves with a coverage map, and rejects if an error occurs.
If the option checkCoverage
(or [100] 100
) is set to true
and code coverage is under the specified
thresholds, the promise will reject with a LowCoverageError
.