diff --git a/tsconfig.json b/tsconfig.json index 3a13f90..9f547cb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,5 +30,5 @@ ".next/dev/types/**/*.ts", "**/*.mts" ], - "exclude": ["node_modules"] + "exclude": ["node_modules", "vitest.setup.ts", "vitest.config.ts", "tests/**"] } diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..199e8ba --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": ["vitest/globals"] + }, + "include": ["vitest.setup.ts", "vitest.config.ts", "tests/**/*.ts", "tests/**/*.tsx"] +} diff --git a/vitest.config.ts b/vitest.config.ts index 5bbfcd5..09eb35c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ globals: true, environment: "jsdom", setupFiles: "./vitest.setup.ts", + typecheck: { tsconfig: "./tsconfig.test.json" }, include: ["tests/**/*.test.{ts,tsx}"], coverage: { provider: "v8",