From 88c0920bfab59f934cf3df51d63f0ae6b81cadee Mon Sep 17 00:00:00 2001 From: Luna <279187109+lunadogbot@users.noreply.github.com> Date: Wed, 29 Apr 2026 14:15:56 +0000 Subject: [PATCH] docs: document function coverage in summary / HTML reports (2.8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a "Function coverage" subsection to the deno coverage reference page describing the new function-coverage column added to the summary table and HTML report in Deno 2.8. Notes that the underlying data was already in lcov output — only the human-readable reporters changed. Refs denoland/deno#32507 --- runtime/reference/cli/coverage.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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