29 lines
752 B
TypeScript
29 lines
752 B
TypeScript
|
|
import { defineConfig } from "vitest/config";
|
||
|
|
import react from "@vitejs/plugin-react";
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [react()],
|
||
|
|
// Native tsconfig path resolution (replaces vite-tsconfig-paths in Vite 5+/Vitest 2+).
|
||
|
|
resolve: {
|
||
|
|
tsconfigPaths: true,
|
||
|
|
},
|
||
|
|
test: {
|
||
|
|
// jsdom covers the few client-helper modules we test (auth-provider, csv export, etc.)
|
||
|
|
// Server-side unit tests don't depend on the DOM.
|
||
|
|
environment: "jsdom",
|
||
|
|
globals: false,
|
||
|
|
include: [
|
||
|
|
"src/**/*.{test,spec}.{ts,tsx}",
|
||
|
|
],
|
||
|
|
// Exclude Playwright E2E specs from Vitest.
|
||
|
|
exclude: [
|
||
|
|
"node_modules/**",
|
||
|
|
".next/**",
|
||
|
|
"e2e/**",
|
||
|
|
"playwright-report/**",
|
||
|
|
"test-results/**",
|
||
|
|
],
|
||
|
|
setupFiles: [],
|
||
|
|
},
|
||
|
|
});
|