Files
hermes-ui/vitest.config.ts
T
toor 3c963bb1d9 Scope coverage to our own sources
v8 coverage had no include, so it walked the entire project root. With the
read-only reference_code checkout present that pulled 572 of 1031 entries into
the report and reported 23.94% for "All files" - a number describing the
reference, not this project. Restricting it to packages/*/src puts the figure
at 59.71%.

Nothing failed on this before because there are no coverage thresholds, but the
report was misleading anyone reading it.
2026-10-19 00:39:57 +08:00

26 lines
774 B
TypeScript

import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': resolve(__dirname, 'packages/client/src'),
'/logo.png': resolve(__dirname, 'packages/client/public/logo.png'),
},
},
test: {
include: ['tests/**/*.test.ts'],
setupFiles: ['tests/setup.ts'],
coverage: {
// Without an explicit include, v8 coverage walks the whole project root.
// While the read-only reference_code/ checkout was present that pulled in
// ~570 of its files and diluted every percentage below.
provider: 'v8',
include: ['packages/*/src/**'],
exclude: ['**/vendor/**', '**/*.d.ts'],
},
},
})