2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 12:57:38 +00:00

Check update_id in TelegramBotPolling test

This commit is contained in:
Yago 2016-03-13 14:29:27 +01:00
parent cee5ac46ea
commit 34e935e81b

View File

@ -519,8 +519,10 @@ describe('Telegram', function () {
describe('#TelegramBotPolling', function () {
it('should call the callback on polling', function (done) {
var opts = {interval: 100, timeout: 1};
var polling = new TelegramPolling(TOKEN, opts, function () {
done();
var polling = new TelegramPolling(TOKEN, opts, function (msg) {
if (msg.update_id === 10) {
done();
}
});
// The second time _getUpdates is called it will return a message
// Really dirty but it works