mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Simplify createDeferredPromise, and add tests (no-changelog) (#10811)
This commit is contained in:
committed by
GitHub
parent
d647ef41ac
commit
cef64329a9
@@ -22,7 +22,7 @@ export async function executeWorkflow(testData: WorkflowTestData, nodeTypes: INo
|
||||
nodeTypes,
|
||||
settings: testData.input.workflowData.settings,
|
||||
});
|
||||
const waitPromise = await createDeferredPromise<IRun>();
|
||||
const waitPromise = createDeferredPromise<IRun>();
|
||||
const nodeExecutionOrder: string[] = [];
|
||||
const additionalData = Helpers.WorkflowExecuteAdditionalData(waitPromise, nodeExecutionOrder);
|
||||
|
||||
@@ -50,6 +50,6 @@ export async function executeWorkflow(testData: WorkflowTestData, nodeTypes: INo
|
||||
const workflowExecute = new WorkflowExecute(additionalData, executionMode, runExecutionData);
|
||||
executionData = await workflowExecute.processRunExecutionData(workflowInstance);
|
||||
|
||||
const result = await waitPromise.promise();
|
||||
const result = await waitPromise.promise;
|
||||
return { executionData, result, nodeExecutionOrder };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user