import { defineConfig } from 'vitest/config'; import { E2E_ENV } from './test-e2e/env'; // E2E suite: real Fastify app + real (disposable, Dockerized) Postgres. // Kept out of the default `npm test` (unit) config on purpose — requires Docker. export default defineConfig({ test: { include: ['test-e2e/**/*.e2e.test.ts'], environment: 'node', env: E2E_ENV, globalSetup: ['./test-e2e/global-setup.ts'], // One worker: tests share the app instance and rate-limiter state is IP-partitioned per test. fileParallelism: false, testTimeout: 60_000, hookTimeout: 120_000, }, });