mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
21 lines
559 B
TypeScript
21 lines
559 B
TypeScript
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
|
|
import nock from 'nock';
|
|
|
|
describe('Test N8n Node', () => {
|
|
const baseUrl = 'https://test.app.n8n.cloud/api/v1';
|
|
const credentials = {
|
|
n8nApi: {
|
|
apiKey: 'key123',
|
|
baseUrl,
|
|
},
|
|
};
|
|
|
|
beforeAll(async () => {
|
|
const { pinData } = await import('./workflow.n8n.workflows.json');
|
|
const apiResponse = pinData.n8n.map((item) => item.json);
|
|
nock(baseUrl).get('/workflows?tags=n8n-test').reply(200, { data: apiResponse });
|
|
});
|
|
|
|
new NodeTestHarness().setupTests({ credentials });
|
|
});
|