From 34e935e81bf258bba3a406b57a099605fbe12f88 Mon Sep 17 00:00:00 2001 From: Yago Date: Sun, 13 Mar 2016 14:29:27 +0100 Subject: [PATCH] Check update_id in TelegramBotPolling test --- test/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/index.js b/test/index.js index 82a0b17..5222973 100644 --- a/test/index.js +++ b/test/index.js @@ -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