feat(test): add Istanbul browser coverage via standalone client config
Vitest 4 silently ignores per-project coverage overrides in test.projects, so a standalone vitest.client-coverage.config.ts provides the root-level Istanbul coverage block that Vitest actually honours. Root vite.config.ts retains the v8 coverage block (reportsDirectory: coverage/server) for the server project. The client config writes to coverage/client and instruments all .svelte and .svelte.ts files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,7 @@ export default defineConfig({
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'lcov'],
|
||||
reportsDirectory: 'coverage/server',
|
||||
// Measure utility and server-side logic only. Svelte components run
|
||||
// in the browser project and are excluded here. Browser-only TS files
|
||||
// (actions, hooks, domain-specific UI state) are also excluded.
|
||||
|
||||
Reference in New Issue
Block a user