Git Product home page Git Product logo

alexa-skill-boilerplate's People

Contributors

acucciniello avatar rogiervandenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

alexa-skill-boilerplate's Issues

Potential enhancement - upgrade tests to use virtual alexa

Hi @acucciniello - I see that you are using our BSTAlexa testing framework here. That is awesome.

I wanted to let you know that we pulled this out of our core https://github.com/bespoken/bst repo and put it in it's own repo, here:
https://github.com/bespoken/virtual-alexa

We also made several enhancements to it - adding promises for returns, simplifying greatly setup and teardown, as well as adding a more user-friendly constructor object. Here is an example of it in action:
https://github.com/bespoken/GuessThePrice/blob/master/test/index-test.js

     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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.