mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 16:57:08 +02:00
fix test
This commit is contained in:
parent
fad6d2b8c8
commit
d9b686bdeb
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user