mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-30 05:48:00 +00:00
[Tests] Update
- Set max-len at 200 - Fix eslint errors
This commit is contained in:
parent
29e0038bf3
commit
47bea20539
@ -5,7 +5,7 @@
|
||||
"new-cap": 0,
|
||||
"prefer-arrow-callback": 0,
|
||||
"no-param-reassign": [2,{"props":false}],
|
||||
"max-len": [2, 150],
|
||||
"max-len": [2, 200],
|
||||
"arrow-body-style": 0,
|
||||
"comma-dangle": 0
|
||||
},
|
||||
|
@ -863,7 +863,7 @@ class TelegramBot extends EventEmitter {
|
||||
return Promise.reject(ex);
|
||||
}
|
||||
return this._request('sendAnimation', opts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to send rounded square videos of upto 1 minute long.
|
||||
@ -1230,7 +1230,7 @@ class TelegramBot extends EventEmitter {
|
||||
editMessageMedia(media, form = {}) {
|
||||
form.media = stringify(media);
|
||||
return this._request('editMessageMedia', { form });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to edit only the reply markup of messages
|
||||
|
@ -1450,8 +1450,8 @@ describe('TelegramBot', function telegramSuite() {
|
||||
before(function before() {
|
||||
utils.handleRatelimit(bot, 'editMessageMedia', this);
|
||||
});
|
||||
it('should edit a media message', function test() {
|
||||
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 => {
|
||||
it('should edit a media message', function nextTest() {
|
||||
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.string(editedResp.caption));
|
||||
});
|
||||
@ -1459,5 +1459,5 @@ describe('TelegramBot', function telegramSuite() {
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}); // End Telegram
|
||||
|
Loading…
x
Reference in New Issue
Block a user