refactor: Overhaul nodes-testing setup - Part 2 (no-changelog) (#14873)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-04-24 17:37:26 +02:00
committed by GitHub
parent 897338bd24
commit 91069f057e
119 changed files with 556 additions and 1002 deletions

View File

@@ -1,6 +1,5 @@
import nock from 'nock';
import { FAKE_CREDENTIALS_DATA } from '@test/nodes/FakeCredentialsMap';
import { getWorkflowFilenames, testWorkflows } from '@test/nodes/Helpers';
import {
@@ -18,10 +17,16 @@ import {
} from './apiResponses';
describe('Telegram', () => {
const credentials = {
telegramApi: {
accessToken: 'testToken',
baseUrl: 'https://api.telegram.org',
},
};
describe('Run Telegram workflow', () => {
beforeAll(() => {
const { baseUrl } = FAKE_CREDENTIALS_DATA.telegramApi;
const mock = nock(baseUrl);
const mock = nock(credentials.telegramApi.baseUrl);
mock.post('/bottestToken/getChat').reply(200, getChatResponse);
mock.post('/bottestToken/sendMessage').reply(200, sendMessageResponse);
@@ -43,6 +48,6 @@ describe('Telegram', () => {
});
const workflows = getWorkflowFilenames(__dirname);
testWorkflows(workflows);
testWorkflows(workflows, credentials);
});
});