mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
✔️ Fix tests
This commit is contained in:
@@ -8,7 +8,9 @@ import {
|
|||||||
INodeTypeData,
|
INodeTypeData,
|
||||||
IRun,
|
IRun,
|
||||||
ITaskData,
|
ITaskData,
|
||||||
|
IWorkflowBase,
|
||||||
IWorkflowExecuteAdditionalData,
|
IWorkflowExecuteAdditionalData,
|
||||||
|
WorkflowHooks,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -248,9 +250,7 @@ export function NodeTypes(): NodeTypesClass {
|
|||||||
|
|
||||||
|
|
||||||
export function WorkflowExecuteAdditionalData(waitPromise: IDeferredPromise<IRun>, nodeExecutionOrder: string[]): IWorkflowExecuteAdditionalData {
|
export function WorkflowExecuteAdditionalData(waitPromise: IDeferredPromise<IRun>, nodeExecutionOrder: string[]): IWorkflowExecuteAdditionalData {
|
||||||
return {
|
const hookFunctions = {
|
||||||
credentials: {},
|
|
||||||
hooks: {
|
|
||||||
nodeExecuteAfter: [
|
nodeExecuteAfter: [
|
||||||
async (nodeName: string, data: ITaskData): Promise<void> => {
|
async (nodeName: string, data: ITaskData): Promise<void> => {
|
||||||
nodeExecutionOrder.push(nodeName);
|
nodeExecutionOrder.push(nodeName);
|
||||||
@@ -261,7 +261,22 @@ export function WorkflowExecuteAdditionalData(waitPromise: IDeferredPromise<IRun
|
|||||||
waitPromise.resolve(fullRunData);
|
waitPromise.resolve(fullRunData);
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
};
|
||||||
|
|
||||||
|
const workflowData: IWorkflowBase = {
|
||||||
|
name: '',
|
||||||
|
createdAt: new Date(),
|
||||||
|
updatedAt: new Date(),
|
||||||
|
active: true,
|
||||||
|
nodes: [],
|
||||||
|
connections: {},
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
credentials: {},
|
||||||
|
hooks: new WorkflowHooks(hookFunctions, 'trigger', '1', workflowData),
|
||||||
|
executeWorkflow: async (workflowId: string): Promise<any> => {}, // tslint:disable-line:no-any
|
||||||
|
restApiUrl: '',
|
||||||
encryptionKey: 'test',
|
encryptionKey: 'test',
|
||||||
timezone: 'America/New_York',
|
timezone: 'America/New_York',
|
||||||
webhookBaseUrl: 'webhook',
|
webhookBaseUrl: 'webhook',
|
||||||
|
|||||||
Reference in New Issue
Block a user