Files
EpicNext-Cms/vitest.config.ts
T
openhands 5d0983fe41
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 2m3s
fix: exclude e2e directory from vitest
2026-07-21 23:39:42 +02:00

24 lines
781 B
TypeScript

import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
// Local config so Vitest does not walk up into the parent Laravel repo's
// vite.config.js (this app lives inside the Laravel project tree).
export default defineConfig({
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
// server-only throws in Node; tests don't need the Next client guard.
"server-only": fileURLToPath(
new URL("./src/test/server-only-stub.ts", import.meta.url),
),
},
},
test: {
environment: "node",
// Modules under test transitively import @/env; skip its strict parse so
// unit tests run without a populated .env.
env: { SKIP_ENV_VALIDATION: "1" },
exclude: ["e2e/**", "node_modules/**", ".next/**"],
},
});