Created
December 1, 2017 00:09
-
-
Save jkelvie/492bc561f0e6b4022431fc31b8d1dcbc to your computer and use it in GitHub Desktop.
This file contains 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
it("Runs through game with two players", async () => { | |
const virtualDevice = new vds.VirtualDevice(process.env.VIRTUAL_DEVICE_TOKEN); | |
await virtualDevice.message("alexa exit"); | |
let result = await virtualDevice.message("open guess the price"); | |
assert.include(result.transcript, "welcome to guess the price how many persons are playing today"); | |
result = await virtualDevice.message("two"); | |
console.log("Result: " + result.transcript); | |
assert.include(result.transcript, "what is your name"); | |
result = await virtualDevice.message("john"); | |
console.log("Result: " + result.transcript); | |
assert.include(result.transcript, "tell us what is your name"); | |
result = await virtualDevice.message("frank"); | |
console.log("Result: " + result.transcript); | |
assert.include(result.transcript, "start the game"); | |
assert.include(result.transcript, "your product is"); | |
result = await virtualDevice.message("200 dollars"); | |
console.log("Result: " + result.transcript); | |
assert.include(result.transcript.toLowerCase(), "the actual price was"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment