mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-28 21:07:39 +00:00
Can't import 'del' module. Use fs.unlinkSync instead.
This commit is contained in:
parent
2247d248c8
commit
c8a4fc6917
@ -2,7 +2,6 @@ var TelegramPolling = require('../src/telegramPolling');
|
|||||||
var Telegram = require('../index');
|
var Telegram = require('../index');
|
||||||
var request = require('request');
|
var request = require('request');
|
||||||
var should = require('should');
|
var should = require('should');
|
||||||
var del = require('del');
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
||||||
@ -446,7 +445,7 @@ describe('Telegram', function () {
|
|||||||
bot.downloadFile(fileId, downloadPath).then(function (filePath) {
|
bot.downloadFile(fileId, downloadPath).then(function (filePath) {
|
||||||
filePath.should.be.an.instanceOf(String);
|
filePath.should.be.an.instanceOf(String);
|
||||||
fs.existsSync(filePath).should.be.true();
|
fs.existsSync(filePath).should.be.true();
|
||||||
del(filePath); // Clean folder after test
|
fs.unlinkSync(filePath); // Delete file after test
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user