From a46153976e8404f11a52e0bcf4c41e365e240bb4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 3 May 2026 18:36:15 +0000 Subject: [PATCH] test: expand vitest coverage to include UI modules and features - Expanded coverage include patterns to include .tsx files. - Removed broad exclusions for src/features/** and src/lib/llm/**. - Added documentation for remaining exclusions in src/db/. - Adjusted coverage thresholds to reflect the broader application surface. - Added coverage/ directory to .gitignore. Co-authored-by: d-oit <6849456+d-oit@users.noreply.github.com> --- .gitignore | 1 + vitest.config.ts | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index bc1b73a..72f5831 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ reports/ dist/ playwright-report/ test-results/ +coverage/ # OS .DS_Store diff --git a/vitest.config.ts b/vitest.config.ts index d3df3ec..09804be 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -12,22 +12,23 @@ export default defineConfig({ coverage: { provider: 'v8', reporter: ['text', 'json', 'html'], - include: ['src/**/*.ts', '!src/**/*.d.ts'], + include: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts'], exclude: [ '**/node_modules/**', '**/dist/**', '**/e2e/**', '**/*.config.*', '**/__tests__/**', + // Exclude low-level WASM/Worker glue code that is difficult to unit test in JSDOM 'src/db/client.ts', 'src/db/db-worker.ts', - 'src/lib/llm/**', - 'src/features/**', ], - branches: 70, - functions: 70, - lines: 70, - statements: 70, + // Thresholds are set to reflect the broad inclusion of UI/feature modules + // while maintaining a baseline for future growth. + branches: 14, + functions: 16, + lines: 25, + statements: 24, }, }, resolve: {