mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
✔️ Fix tests
This commit is contained in:
parent
9cb9ec2b93
commit
3f748e3aa8
|
@ -8,7 +8,9 @@ import {
|
|||
INodeTypeData,
|
||||
IRun,
|
||||
ITaskData,
|
||||
IWorkflowBase,
|
||||
IWorkflowExecuteAdditionalData,
|
||||
WorkflowHooks,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
|
@ -248,9 +250,7 @@ export function NodeTypes(): NodeTypesClass {
|
|||
|
||||
|
||||
export function WorkflowExecuteAdditionalData(waitPromise: IDeferredPromise<IRun>, nodeExecutionOrder: string[]): IWorkflowExecuteAdditionalData {
|
||||
return {
|
||||
credentials: {},
|
||||
hooks: {
|
||||
const hookFunctions = {
|
||||
nodeExecuteAfter: [
|
||||
async (nodeName: string, data: ITaskData): Promise<void> => {
|
||||
nodeExecutionOrder.push(nodeName);
|
||||
|
@ -261,7 +261,22 @@ export function WorkflowExecuteAdditionalData(waitPromise: IDeferredPromise<IRun
|
|||
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',
|
||||
timezone: 'America/New_York',
|
||||
webhookBaseUrl: 'webhook',
|
||||
|
|
Loading…
Reference in a new issue