fix(core): Don't create additional nodeExecuteBefore message (#14958)

This commit is contained in:
Danny Martini
2025-04-29 15:07:30 +02:00
committed by GitHub
parent cc723a12e8
commit a33e3a807a
3 changed files with 168 additions and 9 deletions

View File

@@ -54,7 +54,15 @@ export function WorkflowExecuteAdditionalData(
): IWorkflowExecuteAdditionalData {
const hooks = new ExecutionLifecycleHooks('trigger', '1', mock());
hooks.addHandler('workflowExecuteAfter', (fullRunData) => waitPromise.resolve(fullRunData));
return mock<IWorkflowExecuteAdditionalData>({ hooks, currentNodeExecutionIndex: 0 });
return mock<IWorkflowExecuteAdditionalData>({
hooks,
currentNodeExecutionIndex: 0,
// Not setting this to undefined would set it to a mock which would trigger
// conditions in the WorkflowExecute which only check if a property exists,
// e.g. `if (!this.additionalData.restartExecutionId)`. This would for
// example skip running the `workflowExecuteBefore` hook in the tests.
restartExecutionId: undefined,
});
}
const preparePinData = (pinData: IDataObject) => {