Skip to content

Instantly share code, notes, and snippets.

Last active September 29, 2017 22:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
A Simple Test Using Virtual Alexa
test("Launches and plays", (done) => {
// Launch the skill
alexa.launch().then((payload) => {
// Test the correct text response comes back
expect(payload.response.outputSpeech.ssml).toContain("We show you images we got from Giphy");
// Once it launches, say Yes
return alexa.utter("yes");
}).then((payload) => {
expect(payload.response.outputSpeech.ssml).toContain("Take a look at this image");
// Cancel after the second interaction
return alexa.utter("cancel");
}).then((payload) => {
// Make sure the skill gracefully exists and ends the session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment