Files
2026-06-15 14:22:07 +08:00

31 lines
749 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
test: {
environment: "jsdom",
globals: true,
setupFiles: ["./vitest.setup.ts"],
include: ["**/*.{test,spec}.{ts,tsx}"],
exclude: ["node_modules", ".next", "e2e"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
exclude: ["node_modules", ".next", "e2e", "**/*.d.ts", "**/*.config.*", "vitest.setup.ts"],
thresholds: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});