diff --git a/shared/jest.config.js b/shared/jest.config.js index 610cf77..7de6efb 100644 --- a/shared/jest.config.js +++ b/shared/jest.config.js @@ -3,4 +3,5 @@ module.exports = { testEnvironment: 'node', testMatch: ['/tests/**/*.test.js'], collectCoverageFrom: ['turn.js'], + testTimeout: 10000, }; diff --git a/src/setupTests.js b/src/setupTests.js index 40a8308..842d6b0 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -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,