This commit is contained in:
Charlie Kolb 2025-03-26 11:33:43 +01:00
parent fad6d2b8c8
commit d9b686bdeb
No known key found for this signature in database

View File

@ -432,7 +432,12 @@ describe('makeHandleToolInvocation', () => {
});
it('should continue if json and binary data exist', async () => {
const mockContext = mock<IExecuteFunctions>();
const warnFn = jest.fn();
const mockContext = mock<IExecuteFunctions>({
logger: {
warn: warnFn,
},
});
contextFactory.mockReturnValue(mockContext);
const mockResult = [[{ json: { a: 3 }, binary: { file: 'data' } }]];
@ -455,6 +460,7 @@ describe('makeHandleToolInvocation', () => {
},
],
]);
expect(warnFn).toHaveBeenCalled();
});
it('should handle execution errors and return an error message', async () => {