You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
node-telegram-bot-api/test
GochoMugo d6083e4327 src: Support file options, defaults in sending files 8 years ago
..
data src/telegram: Add TelegramBot#uploadStickerFile 8 years ago
README.md src/telegram: Add TelegramBot#getStickerSet() 8 years ago
mocha.opts [test] Place and update test options in mocha.opts file 9 years ago
telegram.js src: Support file options, defaults in sending files 8 years ago
test.sendfile.js src: Support file options, defaults in sending files 8 years ago
utils.js src: Add proper error handling (#283) 9 years ago

README.md

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 to use in some tests, e.g. TelegramBot#sendGame()
# Defaults to "medusalab_test".
export TEST_GAME_SHORT_NAME=<GAME_SHORT_NAME>

# Sticker set name to use in some tests, e.g. TelegramBot#getStickerSet()
# Defaults to "pusheen".
export TEST_STICKER_SET_NAME=<STICKER_SET_NAME>

# Payment provider token to be used
export TEST_PROVIDER_TOKEN=<YOUR_PROVIDER_TOKEN>

# Run ALL tests
npm run test

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

Note: The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.