Skip to content

Instantly share code, notes, and snippets.

@jkelvie
Created September 29, 2017 22:08
Show Gist options
  • Save jkelvie/ff54515fc3afcac9de224319c7307dd3 to your computer and use it in GitHub Desktop.
Save jkelvie/ff54515fc3afcac9de224319c7307dd3 to your computer and use it in GitHub Desktop.
test("Plays once", (done) => {
alexa.utter("get started").then((payload) => {
expect(payload.response.outputSpeech.ssml).toContain("What is the search term for it");
return alexa.utter("incorrect guess");
}).then((payload) => {
expect(payload.response.outputSpeech.ssml).toContain("Nice try");
return alexa.utter("incorrect guess");
}).then((payload) => {
expect(payload.response.outputSpeech.ssml).toContain("That is not correct");
return alexa.utter("incorrect guess");
}).then((payload) => {
expect(payload.response.outputSpeech.ssml).toContain("No more guesses");
return alexa.utter("no");
}).then((payload) => {
expect(payload.response.outputSpeech.ssml).toContain("Goodbye");
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment