diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..b45b793 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,29 @@ +import tsconfigPaths from "vite-tsconfig-paths"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + projects: [ + { + plugins: [tsconfigPaths()], + esbuild: { jsx: "automatic" }, + test: { + name: "node", + environment: "node", + include: ["src/**/*.test.ts"], + exclude: ["**/node_modules/**", "src/components/**", "src/app/**/page.test.tsx"], + }, + }, + { + plugins: [tsconfigPaths()], + esbuild: { jsx: "automatic" }, + test: { + name: "jsdom", + environment: "jsdom", + include: ["src/components/**/*.test.tsx", "src/app/**/*.test.tsx"], + setupFiles: ["./src/test/setup.ts"], + }, + }, + ], + }, +});