mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Consolidate task result validation in Code node (#18928)
This commit is contained in:
@@ -11,6 +11,13 @@ describe('JsTaskRunnerSandbox', () => {
|
||||
const nodeMode = 'runOnceForEachItem';
|
||||
const workflowMode = 'manual';
|
||||
const executeFunctions = mock<IExecuteFunctions>();
|
||||
executeFunctions.helpers = {
|
||||
...executeFunctions.helpers,
|
||||
normalizeItems: jest
|
||||
.fn()
|
||||
.mockImplementation((items) => (Array.isArray(items) ? items : [items])),
|
||||
};
|
||||
|
||||
const sandbox = new JsTaskRunnerSandbox(jsCode, nodeMode, workflowMode, executeFunctions, 2);
|
||||
let i = 1;
|
||||
executeFunctions.startJob.mockResolvedValue(createResultOk([{ json: { item: i++ } }]));
|
||||
|
||||
Reference in New Issue
Block a user