diff --git a/packages/nodes-base/nodes/Cron/test/Cron.node.test.ts b/packages/nodes-base/nodes/Cron/test/Cron.node.test.ts new file mode 100644 index 00000000000000..fc31d7ef368dcc --- /dev/null +++ b/packages/nodes-base/nodes/Cron/test/Cron.node.test.ts @@ -0,0 +1,16 @@ +import { equalityTest, getWorkflowFilenames, setup, workflowToTests } from '@test/nodes/Helpers'; + +describe('Cron Node', () => { + const workflows = getWorkflowFilenames(__dirname); + const workflowTests = workflowToTests(workflows); + + afterAll(() => { + jest.resetAllMocks(); + }); + + const nodeTypes = setup(workflowTests); + + for (const workflow of workflowTests) { + test(workflow.description, async () => await equalityTest(workflow, nodeTypes)); + } +}); diff --git a/packages/nodes-base/nodes/Cron/test/workflow.test.json b/packages/nodes-base/nodes/Cron/test/workflow.test.json new file mode 100644 index 00000000000000..fdd850dd382494 --- /dev/null +++ b/packages/nodes-base/nodes/Cron/test/workflow.test.json @@ -0,0 +1,23 @@ +{ + "nodes": [ + { + "parameters": { + "rule": { + "interval": [ + { + "field": "seconds", + "secondsInterval": 1 + } + ] + } + }, + "type": "n8n-nodes-base.scheduleTrigger", + "typeVersion": 1.2, + "position": [0, 0], + "id": "d6fdb767-e4f9-439c-8faf-e44620e94fb0", + "name": "Schedule Trigger" + } + ], + "connections": {}, + "pinData": {} +}