Also set jsdom base URL to http://localhost:3000 in vitest config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
637 B
TypeScript
28 lines
637 B
TypeScript
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
define: {
|
|
__BUILD_TIME__: JSON.stringify("2026-01-01T00:00:00.000Z"),
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
environmentOptions: {
|
|
jsdom: {
|
|
url: "http://localhost:3000",
|
|
},
|
|
},
|
|
globals: true,
|
|
testTimeout: 10_000,
|
|
setupFiles: ["./src/setupTests.ts"],
|
|
css: true,
|
|
exclude: ["tests/e2e/**", "node_modules/**"],
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "json-summary"],
|
|
reportsDirectory: "./coverage",
|
|
},
|
|
},
|
|
});
|