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 2 (no-changelog) (#14873)
This commit is contained in:
committed by
GitHub
parent
897338bd24
commit
91069f057e
@@ -1,11 +1,17 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import { FAKE_CREDENTIALS_DATA } from '@test/nodes/FakeCredentialsMap';
|
||||
import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers';
|
||||
|
||||
describe('Test npm Node', () => {
|
||||
const credentials = {
|
||||
npmApi: {
|
||||
accessToken: 'fake-npm-access-token',
|
||||
registryUrl: 'https://fake.npm.registry',
|
||||
},
|
||||
};
|
||||
|
||||
beforeAll(() => {
|
||||
const { registryUrl } = FAKE_CREDENTIALS_DATA.npmApi;
|
||||
const { registryUrl } = credentials.npmApi;
|
||||
const mock = nock(registryUrl); //.matchHeader('Authorization', `Bearer ${accessToken}`);
|
||||
|
||||
mock.get('/-/package/n8n/dist-tags').reply(200, {
|
||||
@@ -29,5 +35,5 @@ describe('Test npm Node', () => {
|
||||
});
|
||||
|
||||
const workflows = getWorkflowFilenames(__dirname);
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user