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,16 +1,10 @@
/* eslint-disable @typescript-eslint/no-loop-func */
import type { IDataObject } from 'n8n-workflow';
import type { IDataObject, WorkflowTestData } from 'n8n-workflow';
import os from 'node:os';
import path from 'path';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import {
getResultNodeData,
setup,
initBinaryDataService,
readJsonFileSync,
} from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { getResultNodeData, initBinaryDataService, readJsonFileSync } from '@test/nodes/Helpers';
if (os.platform() !== 'win32') {
describe('Execute Compression Node', () => {
@@ -53,11 +47,9 @@ if (os.platform() !== 'win32') {
},
];
const nodeTypes = setup(tests);
for (const testData of tests) {
test(testData.description, async () => {
const { result } = await executeWorkflow(testData, nodeTypes);
const { result } = await executeWorkflow(testData);
const resultNodeData = getResultNodeData(result, testData);
resultNodeData.forEach(({ nodeName, resultData }) => {