2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-31 06:16:07 +00:00

Deprecate support for Node.js v0.12

Notes:

  We are deprecating support for Node.js v0.12, to
  be removed in next major version!
This commit is contained in:
GochoMugo
2017-01-09 15:46:27 +03:00
parent ddadc4569b
commit 2a782fddbc
4 changed files with 27 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
const TelegramBot = require('../lib/telegram');
const TelegramBot = require('..');
const Promise = require('bluebird');
const request = require('request-promise');
const assert = require('assert');
@@ -42,6 +42,18 @@ before(function beforeAll() {
});
});
describe('module.exports', function moduleExportsSuite() {
it('is loaded from src/ if NOT on Node.js 0.12', function test() {
if (process.versions.node.split('.')[0] === '0') this.skip(); // skip on Node.js v0.12
assert.equal(TelegramBot, require('../src/telegram'));
});
it('is loaded from lib/ if on Node.js 0.12', function test() {
if (process.versions.node.split('.')[0] !== '0') this.skip(); // skip on newer versions
assert.equal(TelegramBot, require('../lib/telegram'));
});
});
describe('TelegramBot', function telegramSuite() {
let bot;
let testbot;