Created
August 28, 2017 23:44
-
-
Save microsoftly/04045555211774328e296196ae82b27e to your computer and use it in GitHub Desktop.
familiar .then syntax can be used between test steps
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('can do arbitrary work between test steps', () => { | |
let responseString = 'goodbye'; | |
bot.dialog('/', (session) => { | |
// send only numbers for this test case .... | |
session.send(responseString); | |
}); | |
return new BotTester(bot) | |
.sendMessageToBot('you say', 'goodbye') | |
.then(() => responseString = 'hello') | |
.sendMessageToBot('and i say', 'hello') | |
.runTest(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment