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

The client's coverage `include` is `src/**/*.{ts,tsx}` and its `exclude` names
only specs and declarations, so `formatters.bench.ts` counts as production
source. Benchmarks run under `vitest bench`, which the test run never invokes,
so it reports as wholly uncovered and has been depressing the client figure for
as long as it has existed.

It went unnoticed because nothing had touched the file since it was added.
Moving it onto the vitest 5 bench API put it in a diff, and codecov measured the
patch at 0.00% against an 80% target.

It is the only benchmark in the repository today; the glob covers the rest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Elian Doran 2026-09-07 23:40:58 +02:00
parent fc7b6a6846
commit 257ba2f24b
No known key found for this signature in database

View File

@ -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: {