fix(Telegram Node): "source.on is not a function" in Telegram with binary file and Reply Markup (#16458)

This commit is contained in:
RomanDavydchuk
2025-06-18 11:48:55 +03:00
committed by GitHub
parent 879d204bdb
commit 4661e03f93
4 changed files with 225 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ import {
sendAnimationMessageResponse,
sendAudioResponse,
getMemberResponse,
sendMessageWithBinaryDataAndReplyMarkupResponse,
} from './apiResponses';
describe('Telegram', () => {
@@ -47,6 +48,17 @@ describe('Telegram', () => {
mock.post('/bottestToken/getChatMember').reply(200, getMemberResponse);
});
new NodeTestHarness().setupTests({ credentials });
new NodeTestHarness().setupTests({ credentials, workflowFiles: ['workflow.json'] });
});
describe('Binary Data and Reply Markup', () => {
beforeAll(() => {
const mock = nock(credentials.telegramApi.baseUrl);
mock
.post('/bottestToken/sendDocument')
.reply(200, sendMessageWithBinaryDataAndReplyMarkupResponse);
});
new NodeTestHarness().setupTests({ credentials, workflowFiles: ['binaryData.workflow.json'] });
});
});