From dbd02197dd354fed3f229462691b8ef5337d1f92 Mon Sep 17 00:00:00 2001 From: Piyush <91911367+piyushmishra1416@users.noreply.github.com.> Date: Thu, 30 May 2024 12:06:44 +0530 Subject: [PATCH] fixed unit test coverage --- package.json | 2 +- vitest.config.unit..ts => vitest.config.unit.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) rename vitest.config.unit..ts => vitest.config.unit.ts (82%) diff --git a/package.json b/package.json index 40c852075..6b014ebb2 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "start": "next start", "test": "vitest -c ./vitest.config.unit.ts", "test:integration": "./scripts/run-integration.sh", - "coverage": "vitest run --coverage", + "coverage": "vitest run -c ./vitest.config.unit.ts --coverage", "lint:check": "eslint --max-warnings 0 --config .eslintrc .", "lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix", "format:fix": "prettier --write \"**/*.{ts,tsx,json}\"", diff --git a/vitest.config.unit..ts b/vitest.config.unit.ts similarity index 82% rename from vitest.config.unit..ts rename to vitest.config.unit.ts index 35c6cdab3..8f0b71bca 100644 --- a/vitest.config.unit..ts +++ b/vitest.config.unit.ts @@ -6,6 +6,8 @@ export default defineConfig({ test: { globals: true, environment: 'jsdom', + include: ['src/**/*.test.tsx'], + exclude: ['src/tests/**/*.test.tsx'], setupFiles: ['./vitest.setup.ts'], coverage: { provider: 'v8',