mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Overhaul nodes-testing setup - Part 1 (no-changelog) (#14303)
This commit is contained in:
committed by
GitHub
parent
f85b851851
commit
73e8d76e13
@@ -1,6 +1,7 @@
|
||||
import type { WorkflowTestData } from 'n8n-workflow';
|
||||
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
import * as Helpers from '@test/nodes/Helpers';
|
||||
import type { WorkflowTestData } from '@test/nodes/types';
|
||||
|
||||
jest.mock('otpauth', () => {
|
||||
return {
|
||||
@@ -27,12 +28,10 @@ describe('Execute TOTP node', () => {
|
||||
},
|
||||
];
|
||||
|
||||
const nodeTypes = Helpers.setup(tests);
|
||||
|
||||
for (const testData of tests) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
||||
test(testData.description, async () => {
|
||||
const { result } = await executeWorkflow(testData, nodeTypes);
|
||||
const { result } = await executeWorkflow(testData);
|
||||
|
||||
Helpers.getResultNodeData(result, testData).forEach(({ nodeName, resultData }) => {
|
||||
const expected = testData.output.nodeData[nodeName][0][0].json;
|
||||
|
||||
Reference in New Issue
Block a user