Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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