diff --git a/runtime/reference/cli/coverage.md b/runtime/reference/cli/coverage.md index ad35c266b..df914d9c7 100644 --- a/runtime/reference/cli/coverage.md +++ b/runtime/reference/cli/coverage.md @@ -128,6 +128,26 @@ console.log("This line is ignored"); console.log("This line is not ignored"); ``` +## Function coverage + +Starting in Deno 2.8, the summary table and the HTML report include a +**function coverage** column alongside the existing branch and line columns: + +``` +---------------------------------- +File | Branch % | Line % | Function % +---------------------------------- +main.ts | 85.7 | 92.3 | 100.0 +util.ts | 75.0 | 88.5 | 66.7 +---------------------------------- +all files | 80.0 | 90.5 | 83.3 +---------------------------------- +``` + +Function coverage measures the percentage of declared functions that were +called at least once during the test run. The same data was already written +to `lcov` output — Deno 2.8 just surfaces it in the human-readable reporters. + ## Output Formats By default we support Deno's own coverage format - but you can also output