-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.mts
More file actions
43 lines (42 loc) · 1.26 KB
/
vitest.config.mts
File metadata and controls
43 lines (42 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";
export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
globals: true,
environment: "jsdom",
setupFiles: ["src/mocks/test.setup.ts", "./vitest.setup.ts"],
exclude: ["**/node_modules/**", "**/dist/**", "tests/e2e/**"],
env: {
// Exactly 32 bytes for AES-256
BETTER_AUTH_SECRET: "12345678901234567890123456789012", // Exactly 32 bytes for AES-256
OIDC_PROVIDER_ID: "oidc",
OIDC_ISSUER_URL: "https://test-issuer.com",
OIDC_CLIENT_ID: "test-client-id",
OIDC_CLIENT_SECRET: "test-client-secret",
BETTER_AUTH_URL: "http://localhost:3000",
},
coverage: {
provider: "v8",
reporter: ["text", "lcov", "json"],
reportsDirectory: "./coverage",
exclude: [
"node_modules/**",
"src/generated/**",
"src/mocks/**",
"**/*.d.ts",
"**/*.test.{ts,tsx}",
"**/test.setup.ts",
"vitest.setup.ts",
"vitest.config.mts",
"next.config.ts",
"postcss.config.mjs",
"openapi-ts.config.ts",
"scripts/**",
"dev-auth/**",
"helm/**",
],
},
},
});