mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
refactor: Overhaul nodes-testing setup - Part 2 (no-changelog) (#14873)
This commit is contained in:
committed by
GitHub
parent
897338bd24
commit
91069f057e
@@ -5,12 +5,19 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
import { workflowToTests, getWorkflowFilenames } from '@test/nodes/Helpers';
|
||||
|
||||
describe('Test N8n Node, expect base_url to be received from credentials', () => {
|
||||
const credentials = {
|
||||
n8nApi: {
|
||||
apiKey: 'key123',
|
||||
baseUrl: 'https://test.app.n8n.cloud/api/v1',
|
||||
},
|
||||
};
|
||||
|
||||
const workflows = getWorkflowFilenames(__dirname);
|
||||
const tests = workflowToTests(workflows);
|
||||
const tests = workflowToTests(workflows, credentials);
|
||||
|
||||
beforeAll(() => {
|
||||
//base url is set in fake credentials map packages/nodes-base/test/nodes/FakeCredentialsMap.ts
|
||||
const baseUrl = 'https://test.app.n8n.cloud/api/v1';
|
||||
const { baseUrl } = credentials.n8nApi;
|
||||
nock(baseUrl).get('/workflows?tags=n8n-test').reply(200, {});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user