diff --git a/runtime/reference/cli/coverage.md b/runtime/reference/cli/coverage.md index ad35c266b..162e47eb4 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 + +The summary table and the HTML report include a **function coverage** column +alongside the 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 is also available in the `lcov` +output. + ## Output Formats By default we support Deno's own coverage format - but you can also output