Skip to content

Build your personal knowledge base with Trilium Notes

test(client): keep benchmarks out of the coverage report

Elian Doran257ba2f24bb5
diff --git a/apps/client/vite.config.mts b/apps/client/vite.config.mts
index bf7b237c7a..0ec0238dd5 100644
--- a/apps/client/vite.config.mts
+++ b/apps/client/vite.config.mts
@@ -151,7 +151,9 @@ export default defineConfig(() => ({
// every path is unambiguous.
reporter: ["text", "html", ["lcov", { projectRoot: join(import.meta.dirname, "../..") }]],
include: ["src/**/*.{ts,tsx}"],
- exclude: ["**/*.{test,spec}.{ts,mts,cts,tsx,js,jsx}", "**/*.d.ts"]
+ // Benchmarks are measured by `vitest bench`, which the test run never invokes, so a
+ // `*.bench.ts` left in scope reports as wholly uncovered source.
+ exclude: ["**/*.{test,spec}.{ts,mts,cts,tsx,js,jsx}", "**/*.bench.{ts,mts,cts,tsx}", "**/*.d.ts"]
},
},
commonjsOptions: {