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
|
|
@ -2,6 +2,14 @@ const { Constants } = require('librechat-data-provider');
|
|||
const { initializeFakeClient } = require('./FakeClient');
|
||||
|
||||
jest.mock('~/db/connect');
|
||||
jest.mock('~/server/services/Config', () => ({
|
||||
getAppConfig: jest.fn().mockResolvedValue({
|
||||
// Default app config for tests
|
||||
paths: { uploads: '/tmp' },
|
||||
fileStrategy: 'local',
|
||||
memory: { disabled: false },
|
||||
}),
|
||||
}));
|
||||
jest.mock('~/models', () => ({
|
||||
User: jest.fn(),
|
||||
Key: jest.fn(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue