Files
NetForge/vitest.config.ts
2026-03-04 18:48:43 +08:00

23 lines
556 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: "node",
env: {
// Tests run from the host machine, so use localhost instead of Docker service name
DATABASE_URL:
process.env.DATABASE_URL_LOCAL ||
"postgresql://netforge:netforge_dev@localhost:5432/netforge_dev",
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});