mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 05:17:41 +00:00
Feature: We shall allow passing more options to the HTTP server, in `https.createServer()`. We are using a new property, `https`, to avoid any namespace collisions with our own options. `options.key`, `options.cert` and `options.pfx` are convenient options, in that they allow the user to provide paths to the corresponding files, which are read automatically, though synchronously! Implementation: * completely backwards-compatible * all changes are being tested, except `options.pfx` References: * Pass `ca` prop to https.createServer(): https://github.com/yagop/node-telegram-bot-api/pull/17
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 tests
npm run test