mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-09-01 06:45:41 +00:00
src: Load transpiled code for Node 5
References: * Bug-Report #297: https://github.com/yagop/node-telegram-bot-api/issues/297 * Bug-Report-by: @jehy * PR #298: https://github.com/yagop/node-telegram-bot-api/pull/298 * PR-by: @jehy
This commit is contained in:
committed by
Gocho Mugo
parent
607a39ed5e
commit
c1fc486225
@@ -49,12 +49,12 @@ before(function beforeAll() {
|
||||
|
||||
describe('module.exports', function moduleExportsSuite() {
|
||||
const nodeVersion = parseInt(process.versions.node.split('.')[0], 10);
|
||||
it('is loaded from src/ on Node.js v5+ and above', function test() {
|
||||
if (nodeVersion <= 4) this.skip(); // skip on Node.js v4 and below
|
||||
it('is loaded from src/ on Node.js v6+ and above', function test() {
|
||||
if (nodeVersion <= 5) this.skip(); // skip on Node.js v5 and below
|
||||
assert.equal(TelegramBot, require('../src/telegram'));
|
||||
});
|
||||
it('is loaded from lib/ on Node.js v4 and below', function test() {
|
||||
if (nodeVersion > 4) this.skip(); // skip on newer versions
|
||||
it('is loaded from lib/ on Node.js v5 and below', function test() {
|
||||
if (nodeVersion > 5) this.skip(); // skip on newer versions
|
||||
assert.equal(TelegramBot, require('../lib/telegram'));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user