Last active
August 29, 2017 00:21
-
-
Save microsoftly/98cc86b707bb61c9758185f7582cc00c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { BotTester } = require('bot-tester'); | |
const { expect } = require('chai'); | |
describe('Bot Tester', () => { | |
it('accepts RegExp', () => { | |
const numberRegex = /^\d+/; | |
bot.dialog('/', (session) => { | |
session.send(session.message.text); | |
}); | |
return new BotTester(bot) | |
.sendMessageToBot('1', numberRegex) | |
.sendMessageToBot('3156', numberRegex) | |
.sendMessageToBot('8675309', numberRegex) | |
.runTest(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment