import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { globals: true, include: ['src/**/*.test.ts'], // Cosmos-emulator suites live alongside unit/integration tests but // require a live emulator; they are run by vitest.cosmos.config.ts and // must be excluded from the default `pnpm test` run so contributors // without Docker still get green locally. exclude: ['**/node_modules/**', 'src/**/*.cosmos.test.ts'], passWithNoTests: true, // Some backend integration-style route tests build Fastify apps and import // shared common-platform packages. On cold CI/dev hosts those first tests can // legitimately spend more than Vitest's 5s default in transform/route setup // before the actual assertion path runs. Keep the limit bounded, but high // enough to avoid false negative launch-gate failures. testTimeout: 15_000, hookTimeout: 15_000, env: { ALLOW_ANONYMOUS_DEV: 'true', } }, });