diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.ts index 9cb2f82f88c..2fcb9dcbd00 100644 --- a/frontend/vitest.config.ts +++ b/frontend/vitest.config.ts @@ -34,6 +34,15 @@ export default defineConfig({ // which Angular's `fakeAsync` requires. Karma+Jasmine installed this // implicitly; the @angular/build:unit-test path doesn't. setupFiles: ["src/test-zone-setup.ts"], + // Headroom over Vitest's defaults (5s test / 10s hook) for the shared + // macos-latest runners, whose wall time swings ~2x run to run: the same + // test that takes ~400ms on ubuntu has been observed at 11s+ in a + // beforeEach on a loaded macOS runner, and the leg was failing on pure + // timeouts in a different spec nearly every time (#7713). These limits are + // 4x/3x the defaults; a genuinely hung test still fails, 15–20 seconds + // later on a 9–17 minute leg. + testTimeout: 20000, + hookTimeout: 30000, // Per-spec exclusions live in `angular.json` (the unit-test builder // applies them at the discovery stage, before Vitest's own filter, // which is what the Vitest team recommends — see the Vite warning