feat: implement esting suite using Vitest and add to ci

This commit is contained in:
Your Name
2026-04-12 13:38:40 +05:30
parent b5eaf8f476
commit 118a73d4aa
10 changed files with 287 additions and 21 deletions
+23
View File
@@ -0,0 +1,23 @@
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vitest/config";
export default defineConfig({
envDir: "..",
plugins: [react(), tailwindcss()],
test: {
env: {
VITE_API_URL: "http://piku-server",
},
environment: "jsdom",
globals: true,
setupFiles: ["./test/setup.ts"],
coverage: {
provider: "v8",
reporter: ["text", "html"],
include: ["**/*.ts", "**/*.tsx"],
exclude: ["node_modules", "dist", "**/*.d.ts", "./test/**"],
thresholds: { lines: 80, functions: 80, branches: 80 },
},
},
});