1/** 2 * Integration suite config (TASK-0091 realtime + the Testcontainers API 3 * suite). 4 * 5 * - `realtime/` — Docker-free: an in-process `createRealtimeServer` on 6 * ephemeral ports (rt-helpers.ts), real `ws` clients. 7 * - the `*.integration.test.ts` at the package root — full API stack via 8 * Testcontainers Postgres/Redis (needs a Docker daemon; the CI runner). 9 * 10 * Timeouts: the realtime suite is timer-driven with short REAL cadences 11 * (heartbeat 300 ms, prune 1.5 s, GC 0.5–1 s) — 30 s per test is ample; 12 * the container suite gets 180 s for image pulls on cold runners. 13 */ 14import { defineConfig } from "vitest/config"; 15 16export default defineConfig({ 17 test: { 18 environment: "node", 19 include: ["**/*.test.ts"], 20 testTimeout: 30_000, 21 hookTimeout: 180_000, 22 // The container suite spawns long-lived child processes (prisma 23 // migrate); keep workers isolated. 24 pool: "forks", 25 poolOptions: { 26 forks: { 27 singleFork: false, 28 }, 29 }, 30 // Never hang on a fixture that leaks a timer/socket. 31 teardownTimeout: 15_000, 32 }, 33}); 34