Skip to content

Instantly share code, notes, and snippets.

@jkelvie
Created December 1, 2017 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkelvie/492bc561f0e6b4022431fc31b8d1dcbc to your computer and use it in GitHub Desktop.
Save jkelvie/492bc561f0e6b4022431fc31b8d1dcbc to your computer and use it in GitHub Desktop.
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