mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +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
|
|
@ -12,6 +12,15 @@ jest.mock('~/server/services/UserService', () => ({
|
|||
checkUserKeyExpiry: jest.requireActual('~/server/services/UserService').checkUserKeyExpiry,
|
||||
}));
|
||||
|
||||
jest.mock('~/server/services/Config', () => ({
|
||||
getAppConfig: jest.fn().mockResolvedValue({
|
||||
azureAssistants: {
|
||||
apiKey: 'test-key',
|
||||
baseURL: 'https://test.url',
|
||||
},
|
||||
}),
|
||||
}));
|
||||
|
||||
const today = new Date();
|
||||
const tenDaysFromToday = new Date(today.setDate(today.getDate() + 10));
|
||||
const isoString = tenDaysFromToday.toISOString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue