-
-
Notifications
You must be signed in to change notification settings - Fork 244
Expand file tree
/
Copy pathvite.config.ts
More file actions
22 lines (20 loc) · 721 Bytes
/
vite.config.ts
File metadata and controls
22 lines (20 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// @ts-check
import { defineConfig } from "vitest/config";
const isBrowser = process.env.BROWSER === "true";
const browserBaseUrl = process.env.TEST_HTTP_BASE_URL || "http://localhost:3000/";
export default defineConfig({
test: {
environment: isBrowser ? "jsdom" : "node",
environmentOptions: isBrowser ? { jsdom: { url: browserBaseUrl } } : undefined,
dir: "test",
exclude: ["**/__IGNORED__/**"],
watch: false,
globalSetup: isBrowser ? ["./test/fixtures/server.ts"] : [],
testTimeout: 5000,
globals: true,
passWithNoTests: true,
reporters: ["verbose"],
coverage: { reporter: ["lcov", "html", "text"] },
snapshotSerializers: ["./test/utils/serializeJson.ts"],
},
});