diff --git a/apps/web/package.json b/apps/web/package.json index 6e35281..3879115 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -23,7 +23,7 @@ "@types/react": "^18", "@types/react-dom": "^18", "@vitejs/plugin-react": "^4.3.2", - "@vitest/coverage-v8": "2.1.3", + "@vitest/coverage-istanbul": "^2.1.3", "eslint": "^8", "eslint-config-next": "14.2.6", "jsdom": "^25.0.1", diff --git a/apps/web/vitest.config.ts b/apps/web/vitest.config.ts index ef6ac31..ec75333 100644 --- a/apps/web/vitest.config.ts +++ b/apps/web/vitest.config.ts @@ -1,9 +1,18 @@ -import { defineConfig } from "vitest/config"; +import { defineConfig, configDefaults } from "vitest/config"; import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], test: { environment: "jsdom", + coverage: { + ...configDefaults.coverage, + provider: "istanbul", + exclude: [ + ...configDefaults.coverage.exclude!, + "next.config.mjs", + "app/layout.tsx", + ], + }, }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 23f717d..860b4fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,6 +109,9 @@ importers: '@vitejs/plugin-react': specifier: ^4.3.2 version: 4.3.2(vite@5.4.9) + '@vitest/coverage-istanbul': + specifier: ^2.1.3 + version: 2.1.3(vitest@2.1.3) '@vitest/coverage-v8': specifier: 2.1.3 version: 2.1.3(vitest@2.1.3) @@ -2152,6 +2155,26 @@ packages: - supports-color dev: true + /@vitest/coverage-istanbul@2.1.3(vitest@2.1.3): + resolution: {integrity: sha512-FByj6ni54EzA4SXl5X3ugSeeBSI6MSEQBbvPefF6x6GCajePLeZSNYt7u0NOKUQbWpQpAdHHstrqR9ALEpnAxA==} + peerDependencies: + vitest: 2.1.3 + dependencies: + '@istanbuljs/schema': 0.1.3 + debug: 4.3.7 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-instrument: 6.0.3 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 5.0.6 + istanbul-reports: 3.1.7 + magicast: 0.3.5 + test-exclude: 7.0.1 + tinyrainbow: 1.2.0 + vitest: 2.1.3(@types/node@20.16.5)(jsdom@25.0.1) + transitivePeerDependencies: + - supports-color + dev: true + /@vitest/coverage-v8@2.1.3(vitest@2.1.3): resolution: {integrity: sha512-2OJ3c7UPoFSmBZwqD2VEkUw6A/tzPF0LmW0ZZhhB8PFxuc+9IBG/FaSM+RLEenc7ljzFvGN+G0nGQoZnh7sy2A==} peerDependencies: