mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-31 06:16:07 +00:00
src/telegram: Populate Stream#path from TelegramBot#getFileStream()
This commit is contained in:
@@ -1173,6 +1173,7 @@ describe('TelegramBot', function telegramSuite() {
|
||||
it('should get a file stream', function test(done) {
|
||||
const fileStream = bot.getFileStream(FILE_ID);
|
||||
assert.ok(fileStream instanceof stream.Readable);
|
||||
assert.equal(fileStream.path, FILE_ID);
|
||||
fileStream.pipe(concat(function readFile(buffer) {
|
||||
buffer.equals(fs.readFileSync(FILE_PATH)); // sync :(
|
||||
return done();
|
||||
|
Reference in New Issue
Block a user