-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
28 lines (27 loc) · 939 Bytes
/
vitest.config.ts
File metadata and controls
28 lines (27 loc) · 939 Bytes
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
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
environment: "node",
// Heavy ESM packages (BullMQ, @supabase/supabase-js) can take >5 s on
// first import in a cold Vitest worker. 15 s gives ample headroom while
// still catching genuine infinite-loop hangs.
testTimeout: 15000,
// Run env-setup before every test file so required env vars are set
// before any project module is imported.
setupFiles: ["./tests/setup/env-setup.ts", "./tests/setup/mock-jwt-verifier.ts"],
include: ["tests/**/*.test.ts", "src/**/__tests__/**/*.test.ts"],
// Reset mock call history (but not implementations) between tests.
clearMocks: true,
coverage: {
provider: "v8",
include: ["src/**/*.ts"],
exclude: [
"src/server.ts",
"src/tracing.ts",
"src/types/**",
"src/config/**",
],
},
},
});