From ca963caabc8520b8099373df2a718cf17ca4cf24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 12 Oct 2026 17:06:13 +0200 Subject: [PATCH] test(coverage): drop the fixture knob no test turns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #3501 rewrote the deleted-function case to keep the `score` record while the source loses the function, which was the assertion that could actually fail. That left `noFunctions` declared and branched on with no caller, so the empty-fnMap path it exists to build is built by nobody and checked by nothing — the same shape as the test-only seam removed earlier, with the fixture standing in for a tool. Nothing else reads the knob, and 59 tests still pass, so the record builder is now the one shape every case uses. --- scripts/coverage-crap/run.test.ts | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/scripts/coverage-crap/run.test.ts b/scripts/coverage-crap/run.test.ts index f4327a690b..9859ad3f44 100644 --- a/scripts/coverage-crap/run.test.ts +++ b/scripts/coverage-crap/run.test.ts @@ -48,8 +48,6 @@ type CoverageOptions = Readonly<{ hits?: number; /** Emit a count no execution can produce, which the sanitizer drops with the whole record. */ corrupt?: boolean; - /** Record the file with no functions in it, as a run over a deleted function's file reports. */ - noFunctions?: boolean; }>; function istanbulRecord(file: string, options: CoverageOptions): Record { @@ -58,19 +56,17 @@ function istanbulRecord(file: string, options: CoverageOptions): Record