diff --git a/api/jest.config.js b/api/jest.config.js index 7169e82259..fd8bd31bd9 100644 --- a/api/jest.config.js +++ b/api/jest.config.js @@ -3,6 +3,7 @@ module.exports = { clearMocks: true, roots: [''], coverageDirectory: 'coverage', + testTimeout: 30000, // 30 seconds timeout for all tests setupFiles: [ './test/jestSetup.js', './test/__mocks__/logger.js', diff --git a/api/test/jestSetup.js b/api/test/jestSetup.js index ed92afd214..71ccaa86d2 100644 --- a/api/test/jestSetup.js +++ b/api/test/jestSetup.js @@ -10,3 +10,8 @@ process.env.JWT_SECRET = 'test'; process.env.JWT_REFRESH_SECRET = 'test'; process.env.CREDS_KEY = 'test'; process.env.CREDS_IV = 'test'; +process.env.ALLOW_EMAIL_LOGIN = 'true'; + +// Set global test timeout to 30 seconds +// This can be overridden in individual tests if needed +jest.setTimeout(30000);