chore: Switch to the new partial execution logic in test runner (no-changelog) (#12140)

This commit is contained in:
Eugene
2024-12-17 09:44:20 +01:00
committed by GitHub
parent 5129865528
commit 2b267b1c05
6 changed files with 235 additions and 71 deletions

View File

@@ -0,0 +1,33 @@
import type { INodeTypeData } from 'n8n-workflow';
export function mockNodeTypesData(
nodeNames: string[],
options?: {
addTrigger?: boolean;
},
) {
return nodeNames.reduce<INodeTypeData>((acc, nodeName) => {
const fullName = nodeName.indexOf('.') === -1 ? `n8n-nodes-base.${nodeName}` : nodeName;
return (
(acc[fullName] = {
sourcePath: '',
type: {
description: {
displayName: nodeName,
name: nodeName,
group: [],
description: '',
version: 1,
defaults: {},
inputs: [],
outputs: [],
properties: [],
},
trigger: options?.addTrigger ? async () => undefined : undefined,
},
}),
acc
);
}, {});
}