From fc90ad594956b25737022d089cc862fab77a4691 Mon Sep 17 00:00:00 2001 From: oyi77 Date: Wed, 1 Apr 2026 08:42:29 +0700 Subject: [PATCH] chore: add vitest config for component testing --- vitest.config.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index 9b14b48f47..a874e2e73b 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -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"), + }, + }, });