added unit test framework

This commit is contained in:
Rajpreet0 2026-04-27 20:28:43 +02:00
parent d3791060d2
commit 3c9fc19a3c
22 changed files with 2206 additions and 15 deletions

View file

@ -1,12 +1,29 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./"),
},
},
test: {
globals: true,
environment: "jsdom",
setupFiles: "./vitest.setup.ts",
include: ["**/*.test.{ts,tsx}"],
include: ["tests/**/*.test.{ts,tsx}"],
coverage: {
provider: "v8",
reporter: ["text", "lcov"],
include: [
"src/app/api/**",
"src/hooks/**",
"src/modules/**/schemas/**",
"src/modules/**/validation/**",
"src/lib/**",
],
},
},
});