From 222b457ed0b8ad79edab88b33a56be69c8fc0a60 Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Mon, 6 Jan 2025 13:22:28 +0100 Subject: [PATCH] fix tests --- .../ExecuteWorkflowTrigger.node.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.test.ts b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.test.ts index b479538c3a..9a5bbdb02e 100644 --- a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.test.ts +++ b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.test.ts @@ -12,8 +12,8 @@ jest.mock('../../../utils/workflowInputsResourceMapping/GenericFunctions', () => describe('ExecuteWorkflowTrigger', () => { const mockInputData: INodeExecutionData[] = [ - { json: { item: 0, foo: 'bar' }, index: 0 }, - { json: { item: 1, foo: 'quz' }, index: 1 }, + { json: { item: 0, foo: 'bar' }, pairedItem: { item: 0 } }, + { json: { item: 1, foo: 'quz' }, pairedItem: { item: 1 } }, ]; const mockNode = mock({ typeVersion: 1 }); const executeFns = mock({ @@ -42,8 +42,14 @@ describe('ExecuteWorkflowTrigger', () => { const result = await new ExecuteWorkflowTrigger().execute.call(executeFns); const expected = [ [ - { index: 0, json: { value1: null, value2: null, foo: mockInputData[0].json.foo } }, - { index: 1, json: { value1: null, value2: null, foo: mockInputData[1].json.foo } }, + { + pairedItem: { item: 0 }, + json: { value1: null, value2: null, foo: mockInputData[0].json.foo }, + }, + { + pairedItem: { item: 1 }, + json: { value1: null, value2: null, foo: mockInputData[1].json.foo }, + }, ], ];