2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 21:07:39 +00:00

[test] Fix incorrect test cases

This commit is contained in:
GochoMugo 2017-01-06 12:41:00 +03:00
parent a7972cc6a4
commit 0cd993f3e8

View File

@ -149,8 +149,9 @@ describe('Telegram', function telegramSuite() {
return utils.isPollingMockServer(pollingPort);
});
it('returns false if bot is not polling', function test() {
return testbot.stopPolling(() => {
return testbot.stopPolling().then(() => {
assert.equal(testbot.isPolling(), false);
utils.clearPollingCheck(pollingPort);
return utils.isPollingMockServer(pollingPort, true);
});
});
@ -162,7 +163,6 @@ describe('Telegram', function telegramSuite() {
describe('#stopPolling', function stopPollingSuite() {
it('stops polling by bot', function test() {
return testbot.stopPolling().then(() => {
assert.equal(testbot.isPolling(), false);
utils.clearPollingCheck(pollingPort);
return utils.isPollingMockServer(pollingPort, true);
});