ci: Mock getAppConfig in various tests to provide default configurations

This commit is contained in:
Danny Avila 2025-08-17 19:39:22 -04:00
parent 2501d11fa0
commit b2b2aee945
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
7 changed files with 150 additions and 23 deletions

View file

@ -30,6 +30,12 @@ jest.mock('~/server/services/Config', () => ({
headers: { 'x-user': '{{LIBRECHAT_USER_ID}}', 'x-email': '{{LIBRECHAT_USER_EMAIL}}' },
models: { default: ['test-model'] },
}),
getAppConfig: jest.fn().mockResolvedValue({
'test-endpoint': {
apiKey: 'test-key',
baseURL: 'https://test.com',
},
}),
}));
jest.mock('~/server/services/ModelService', () => ({