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",
		},
	},
});
