test: add 10s timeout guard across all suites

Hangs/regressions fail fast instead of stalling CI.

- shared/jest.config.js: testTimeout 10000
- src/setupTests.js: jest.setTimeout(10000) (CRA blocks testTimeout in
  package.json — not in allowlist)
- server/jest.config.js: already had 10000

Verified: injected hanging test -> 'Exceeded timeout of 10000 ms'.
This commit is contained in:
david raistrick
2026-07-04 17:03:34 -04:00
parent 81a1629118
commit 8ad750c60a
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -3,4 +3,5 @@ module.exports = {
testEnvironment: 'node',
testMatch: ['<rootDir>/tests/**/*.test.js'],
collectCoverageFrom: ['turn.js'],
testTimeout: 10000,
};
+4
View File
@@ -8,6 +8,10 @@ import { resetMockDb } from './__mocks__/firebase/_mock-db';
// Must be set before any component renders.
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
// Test timeout guard. CRA blocks `testTimeout` in package.json jest config
// (not in allowlist). Set via jest global here instead. Fails fast on hang.
jest.setTimeout(10000);
// WARNING = FAILURE. Fail test on any console.error/warn (React act warnings,
// deprecations, prop errors). App code's own error logs allowed only inside
// try/catch failure paths — those tests should assert the error was handled,