refactor: Overhaul nodes-testing setup - Part 1 (no-changelog) (#14303)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-04-01 10:15:13 +02:00
committed by GitHub
parent f85b851851
commit 73e8d76e13
165 changed files with 3397 additions and 6453 deletions

View File

@@ -1,10 +1,9 @@
import { readFileSync } from 'fs';
import type { IWorkflowBase } from 'n8n-workflow';
import type { IWorkflowBase, WorkflowTestData } from 'n8n-workflow';
import path from 'path';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as Helpers from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
describe('Execute Spreadsheet File Node', () => {
beforeEach(async () => {
@@ -201,13 +200,11 @@ describe('Execute Spreadsheet File Node', () => {
},
];
const nodeTypes = Helpers.setup(tests);
for (const testData of tests) {
// eslint-disable-next-line @typescript-eslint/no-loop-func
test(testData.description, async () => {
// execute workflow
const { result } = await executeWorkflow(testData, nodeTypes);
const { result } = await executeWorkflow(testData);
// check if result node data matches expected test data
const resultNodeData = Helpers.getResultNodeData(result, testData);