mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
[test] Fix incorrect test cases
This commit is contained in:
parent
a7972cc6a4
commit
0cd993f3e8
@ -149,8 +149,9 @@ describe('Telegram', function telegramSuite() {
|
|||||||
return utils.isPollingMockServer(pollingPort);
|
return utils.isPollingMockServer(pollingPort);
|
||||||
});
|
});
|
||||||
it('returns false if bot is not polling', function test() {
|
it('returns false if bot is not polling', function test() {
|
||||||
return testbot.stopPolling(() => {
|
return testbot.stopPolling().then(() => {
|
||||||
assert.equal(testbot.isPolling(), false);
|
assert.equal(testbot.isPolling(), false);
|
||||||
|
utils.clearPollingCheck(pollingPort);
|
||||||
return utils.isPollingMockServer(pollingPort, true);
|
return utils.isPollingMockServer(pollingPort, true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -162,7 +163,6 @@ describe('Telegram', function telegramSuite() {
|
|||||||
describe('#stopPolling', function stopPollingSuite() {
|
describe('#stopPolling', function stopPollingSuite() {
|
||||||
it('stops polling by bot', function test() {
|
it('stops polling by bot', function test() {
|
||||||
return testbot.stopPolling().then(() => {
|
return testbot.stopPolling().then(() => {
|
||||||
assert.equal(testbot.isPolling(), false);
|
|
||||||
utils.clearPollingCheck(pollingPort);
|
utils.clearPollingCheck(pollingPort);
|
||||||
return utils.isPollingMockServer(pollingPort, true);
|
return utils.isPollingMockServer(pollingPort, true);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user