2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-30 13:58:27 +00:00

[Tests] Update

- Set max-len at 200
- Fix eslint errors
This commit is contained in:
Mohammed Sohail Sameja 2018-10-31 21:34:24 +05:30
parent 29e0038bf3
commit 47bea20539
No known key found for this signature in database
GPG Key ID: 7DD45520C01CD85D
3 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
"new-cap": 0, "new-cap": 0,
"prefer-arrow-callback": 0, "prefer-arrow-callback": 0,
"no-param-reassign": [2,{"props":false}], "no-param-reassign": [2,{"props":false}],
"max-len": [2, 150], "max-len": [2, 200],
"arrow-body-style": 0, "arrow-body-style": 0,
"comma-dangle": 0 "comma-dangle": 0
}, },

View File

@ -863,7 +863,7 @@ class TelegramBot extends EventEmitter {
return Promise.reject(ex); return Promise.reject(ex);
} }
return this._request('sendAnimation', opts); return this._request('sendAnimation', opts);
} }
/** /**
* Use this method to send rounded square videos of upto 1 minute long. * Use this method to send rounded square videos of upto 1 minute long.
@ -1230,7 +1230,7 @@ class TelegramBot extends EventEmitter {
editMessageMedia(media, form = {}) { editMessageMedia(media, form = {}) {
form.media = stringify(media); form.media = stringify(media);
return this._request('editMessageMedia', { form }); return this._request('editMessageMedia', { form });
} }
/** /**
* Use this method to edit only the reply markup of messages * Use this method to edit only the reply markup of messages

View File

@ -1450,8 +1450,8 @@ describe('TelegramBot', function telegramSuite() {
before(function before() { before(function before() {
utils.handleRatelimit(bot, 'editMessageMedia', this); utils.handleRatelimit(bot, 'editMessageMedia', this);
}); });
it('should edit a media message', function test() { it('should edit a media message', function nextTest() {
return bot.editMessageMedia({ type: 'animation', media: resp.document.file_id, caption: 'media message edited'}, { chat_id: resp.chat.id, message_id: resp.message_id}).then(editedResp => { return bot.editMessageMedia({ type: 'animation', media: resp.document.file_id, caption: 'edited' }, { chat_id: resp.chat.id, message_id: resp.message_id }).then(editedResp => {
assert.ok(is.object(editedResp)); assert.ok(is.object(editedResp));
assert.ok(is.string(editedResp.caption)); assert.ok(is.string(editedResp.caption));
}); });
@ -1459,5 +1459,5 @@ describe('TelegramBot', function telegramSuite() {
}); });
}); });
}); });
}); });
}); // End Telegram }); // End Telegram