2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-09-05 16:55:28 +00:00
Files
node-telegram-bot-api/test
GochoMugo d4a469df6b pkg: Fix bug #275
Bug:

  Node.js v4 does not support the ES6 syntax fully, thus we
  get the error:

    Block scoped declarations (let, const, function,class) not yet
    supported outside strict mode

Fix:

  * Load transpiled code
  * Deprecate support for Node.js v4.x

References:

  * Bug report: https://github.com/yagop/node-telegram-bot-api/issues/275
  * PR: https://github.com/yagop/node-telegram-bot-api/pull/280
  * Reported-by: @crazyabdul
  * PR-by: @crazyabdul
2017-02-08 12:16:51 +03:00
..
2017-01-02 14:37:39 +03:00
2017-01-20 09:13:18 +03:00
2017-02-08 12:16:51 +03:00
2017-01-30 12:50:22 +03:00

Running the tests:

# Token to be used
export TEST_TELEGRAM_TOKEN=<YOUR_BOT_TOKEN>

# User Id which you want to send the messages.
export TEST_USER_ID=<USER_ID>

# Group Id which to use in some of the tests, e.g. for TelegramBot#getChat()
export TEST_GROUP_ID=<GROUP_ID>

# Game short name which to use in some of the tests, e.g. TelegramBot#sendGame()
export TEST_GAME_SHORT_NAME=<GAME_SHORT_NAME>

# Run ALL tests
npm run test

# Run individual tests
npm run eslint              # static-analysis
npm run mocha               # mocha tests