feat(Code Node): Warning if pairedItem absent or could not be auto mapped (#11737)

Co-authored-by: Shireen Missi <shireen@n8n.io>
This commit is contained in:
Michael Kret
2024-11-27 18:31:36 +02:00
committed by GitHub
parent af61dbf37f
commit 3a5bd12945
9 changed files with 110 additions and 16 deletions

View File

@@ -57,7 +57,8 @@ describe('Code Node unit test', () => {
jest.spyOn(NodeVM.prototype, 'run').mockResolvedValueOnce(input);
const output = await node.execute.call(thisArg);
expect(output).toEqual([expected]);
expect([...output]).toEqual([expected]);
}),
);
});
@@ -109,7 +110,7 @@ describe('Code Node unit test', () => {
jest.spyOn(NodeVM.prototype, 'run').mockResolvedValueOnce(input);
const output = await node.execute.call(thisArg);
expect(output).toEqual([[{ json: expected?.json, pairedItem: { item: 0 } }]]);
expect([...output]).toEqual([[{ json: expected?.json, pairedItem: { item: 0 } }]]);
}),
);
});