Я пытаюсь получить уведомление с ботом о шагах моих тестов на кипарис, для этого я установил telegram-bot-api npm i telegram-bot-api
, и мой тест теперь выглядит так:
const TelegramBot = require('telegram-bot-api');
const TOKEN = 'my key';
const INTERNAL_CHAT = 'chatid';
describe("Auto-booker", function() {
it("start", function () {
const bot = new TelegramBot(TOKEN, {polling: true});
bot.sendMessage(INTERNAL_CHAT, "Started test #XXX...");
});
});
Но я получаю ошибку:
Uncaught TypeError: Cannot read property 'prototype' of undefined
This error originated from your test code, not from Cypress.
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure.
Check your console for the stack trace or click this message to see where it originated from.