mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +01:00
refactor: original changes
This commit is contained in:
parent
fa9177180f
commit
f9c0e9853f
83 changed files with 413 additions and 505 deletions
|
|
@ -21,25 +21,6 @@ jest.mock('~/lib/db/connectDb', () => {
|
|||
},
|
||||
};
|
||||
});
|
||||
jest.mock('@librechat/data-schemas', () => {
|
||||
const userModelMock = {
|
||||
createUser: jest.fn(() => mockUser),
|
||||
findUser: jest.fn(),
|
||||
updateUser: jest.fn(),
|
||||
};
|
||||
return {
|
||||
registerModels: jest.fn().mockReturnValue({
|
||||
User: userModelMock,
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('~/models/Message', () => ({
|
||||
Message: jest.fn(),
|
||||
}));
|
||||
jest.mock('~/models/Conversation', () => ({
|
||||
Conversation: jest.fn(),
|
||||
}));
|
||||
jest.mock('~/models/File', () => ({
|
||||
File: jest.fn(),
|
||||
}));
|
||||
|
|
@ -63,9 +44,6 @@ describe('Tool Handlers', () => {
|
|||
const mainPlugin = availableTools.find((tool) => tool.pluginKey === pluginKey);
|
||||
const authConfigs = mainPlugin.authConfig;
|
||||
|
||||
const { registerModels } = require('@librechat/data-schemas');
|
||||
let User = registerModels().User;
|
||||
|
||||
beforeAll(async () => {
|
||||
mockUser.save.mockResolvedValue(undefined);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue