chore: Upgrade nock and delete nock related boilerplate code (no-changelog) (#12869)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-01-27 18:17:51 +01:00
committed by GitHub
parent 0bb65f27ab
commit f64c6bf9ac
154 changed files with 75 additions and 1483 deletions

View File

@@ -36,7 +36,6 @@ import type {
WorkflowTestData,
} from 'n8n-workflow';
import { ApplicationError, ICredentialsHelper, NodeHelpers, WorkflowHooks } from 'n8n-workflow';
import nock from 'nock';
import { tmpdir } from 'os';
import path from 'path';
@@ -225,16 +224,6 @@ export function setup(testData: WorkflowTestData[] | WorkflowTestData) {
testData = [testData];
}
if (testData.some((t) => !!t.nock)) {
beforeAll(() => {
nock.disableNetConnect();
});
afterAll(() => {
nock.restore();
});
}
const nodeTypes = new NodeTypes();
const nodes = [...new Set(testData.flatMap((data) => data.input.workflowData.nodes))];
@@ -383,7 +372,6 @@ export const workflowToTests = (workflowFiles: string[]) => {
export const testWorkflows = (workflows: string[]) => {
const tests = workflowToTests(workflows);
const nodeTypes = setup(tests);
for (const testData of tests) {