maestro/vitest.config.ts
oss-sync 2044f0a2c4
Some checks failed
CI / build-and-test (push) Failing after 7m0s
sync: update from private repo (91d8d79c)
2026-07-09 23:57:26 +00:00

35 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { configDefaults, defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// The default 5s timeouts are too tight for this suite's DB-heavy tests:
// ~16 files replay the full migration chain (runMigrations) against a fresh
// sqlite DB, costing ~3-4s each in isolation. Under the full concurrent
// suite on a contended CI runner (the act_runner shares its host with the
// production orchestrator + the OSS runner) they overshoot 5s and flake —
// e.g. migrate.gateway-2b.test.ts timed out at 6.5s in the test body.
//
// The heavy work lives in BOTH test bodies (gateway-2b) and beforeEach
// hooks (repository.spaces-resource-isolation, repository-local-auth,
// migrate.space-id which runs runMigrations twice, ...), so we raise
// testTimeout AND hookTimeout — a body-only bump would leave the hook-based
// files flaking on the 10s hookTimeout default. A global bump (vs per-file
// timeouts on ~16 files × their hooks) is the maintainable choice for a
// flake class that spans bodies, hooks, and future DB tests; 20s still
// bounds a genuinely hung test (worst case ~15s slower feedback on a ~4min
// suite). Individual slower tests (browser/Playwright) still set their own.
testTimeout: 20_000,
hookTimeout: 20_000,
exclude: [
...configDefaults.exclude,
'.claude/**',
'.superpowers/**',
'.worktrees/**',
// Playwright E2E specs — run via `npm run test:e2e`, not vitest. They
// import @playwright/test and fail collection under vitest.
'ui/e2e/**',
'ui/e2e-auth/**',
],
},
});