我正试图通过bot通知我有关柏测试的步骤,因为我已经安装了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.