it("Launches successfully", async function() {
const bvd = require("virtual-alexa");
const alexa = bvd.VirtualAlexa.Builder()
.handler("index.handler") // Lambda function file and name
.intentSchemaFile("./speechAssets/IntentSchema.json")
.sampleUtterancesFile("./speechAssets/SampleUtterances.txt")
.create();
let reply = await alexa.launch();
assert.include(reply.response.outputSpeech.ssml, "Welcome to guess the price");
reply = await alexa.utter("two");
assert.include(reply.response.outputSpeech.ssml, "what is your name");
assert.include(reply.response.outputSpeech.ssml, "contestant one");
reply = await alexa.utter("john");
assert.include(reply.response.outputSpeech.ssml, "what is your name");
assert.include(reply.response.outputSpeech.ssml, "Contestant 2");
reply = await alexa.utter("juan");
assert.include(reply.response.outputSpeech.ssml, "let's start the game");
assert.include(reply.response.outputSpeech.ssml, "Guess the price");
reply = await alexa.filter(function (request) {
console.log("Request: " + JSON.stringify(request, null, 2));
}).utter("200 dollars");
assert.include(reply.response.outputSpeech.ssml, "the actual price was");
});
When you have a chance, please take a look - would love your feedback on it. And if you choose to use it, happy to help or answer any questions.