mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
chore: Update Jest configuration and test setup for improved timeout handling
- Added a global test timeout of 30 seconds in jest.config.js. - Configured jest.setTimeout in jestSetup.js to allow individual test overrides if needed. - Enhanced test reliability by ensuring consistent timeout settings across all tests.
This commit is contained in:
parent
2cf910351a
commit
33e09c1f52
2 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ module.exports = {
|
|||
clearMocks: true,
|
||||
roots: ['<rootDir>'],
|
||||
coverageDirectory: 'coverage',
|
||||
testTimeout: 30000, // 30 seconds timeout for all tests
|
||||
setupFiles: [
|
||||
'./test/jestSetup.js',
|
||||
'./test/__mocks__/logger.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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue