From 8256673744321945fd1052d6ec2cee79e4b06360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Sun, 12 Apr 2026 20:57:58 +0200 Subject: [PATCH] test(shared): exclude type-only and static-data files from coverage src/types/* are pure re-export files for TypeScript types (0 runtime functions). src/constants/publicHolidays.ts and germanStates.ts are static data constants. Together they drag %Funcs to ~55% in CI even though every tested module is at 100%. Exclude them from the coverage envelope so the thresholds reflect code that is actually exercised. Co-Authored-By: Claude Opus 4.6 --- packages/shared/vitest.config.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/shared/vitest.config.ts b/packages/shared/vitest.config.ts index 34ab343..6fb0a30 100644 --- a/packages/shared/vitest.config.ts +++ b/packages/shared/vitest.config.ts @@ -6,6 +6,17 @@ export default defineConfig({ environment: "node", coverage: { provider: "v8", + // src/types/* are pure type-only re-export files and publicHolidays / + // germanStates are static data constants. Exclude them — they drag + // %Funcs down to ~55% while adding no real code-under-test. + exclude: [ + "src/types/**", + "src/constants/publicHolidays.ts", + "src/constants/germanStates.ts", + "src/constants/index.ts", + "**/*.d.ts", + "**/__tests__/**", + ], thresholds: { lines: 70, functions: 70,