/** * Integration suite config (TASK-0091 realtime + the Testcontainers API * suite). * * - `realtime/` — Docker-free: an in-process `createRealtimeServer` on * ephemeral ports (rt-helpers.ts), real `ws` clients. * - the `*.integration.test.ts` at the package root — full API stack via * Testcontainers Postgres/Redis (needs a Docker daemon; the CI runner). * * Timeouts: the realtime suite is timer-driven with short REAL cadences * (heartbeat 300 ms, prune 1.5 s, GC 0.5–1 s) — 30 s per test is ample; * the container suite gets 180 s for image pulls on cold runners. */ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { environment: "node", include: ["**/*.test.ts"], testTimeout: 30_000, hookTimeout: 180_000, // The container suite spawns long-lived child processes (prisma // migrate); keep workers isolated. pool: "forks", poolOptions: { forks: { singleFork: false, }, }, // Never hang on a fixture that leaks a timer/socket. teardownTimeout: 15_000, }, });