chore: add vitest config for component testing

This commit is contained in:
oyi77
2026-04-01 08:42:29 +07:00
parent 3f7765fdc8
commit fc90ad5949

View File

@@ -1,12 +1,18 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
test: {
environment: "jsdom",
globals: true,
setupFiles: [],
include: ["src/app/(dashboard)/dashboard/cache/**/*.tsx"],
include: ["src/app/(dashboard)/dashboard/cache/__tests__/**/*.test.tsx"],
exclude: ["**/node_modules/**", "**/.git/**"],
},
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});