mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 19:30:15 +01:00
ci: Mock getAppConfig in various tests to provide default configurations
This commit is contained in:
parent
2501d11fa0
commit
b2b2aee945
7 changed files with 150 additions and 23 deletions
|
|
@ -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', () => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue