import { setup, equalityTest, workflowToTests, getWorkflowFilenames, } from '../../../../test/nodes/Helpers'; import nock from 'nock'; // eslint-disable-next-line n8n-local-rules/no-unneeded-backticks const feed = `<![CDATA[Lorem ipsum feed for an interval of 1 minutes with 3 item(s)]]>http://example.com/RSS for NodeThu, 09 Feb 2023 13:40:32 GMTThu, 09 Feb 2023 13:40:00 GMT1<![CDATA[Lorem ipsum 2023-02-09T13:40:00Z]]>http://example.com/test/1675950000http://example.com/test/1675950000Thu, 09 Feb 2023 13:40:00 GMT<![CDATA[Lorem ipsum 2023-02-09T13:39:00Z]]>http://example.com/test/1675949940http://example.com/test/1675949940Thu, 09 Feb 2023 13:39:00 GMT<![CDATA[Lorem ipsum 2023-02-09T13:38:00Z]]>http://example.com/test/1675949880http://example.com/test/1675949880Thu, 09 Feb 2023 13:38:00 GMT`; describe('Test HTTP Request Node', () => { const workflows = getWorkflowFilenames(__dirname); const tests = workflowToTests(workflows); beforeAll(() => { nock.disableNetConnect(); nock('https://lorem-rss.herokuapp.com').get('/feed?length=3').reply(200, feed); }); afterAll(() => { nock.restore(); }); const nodeTypes = setup(tests); for (const testData of tests) { test(testData.description, async () => equalityTest(testData, nodeTypes)); } });