bespoken / virtual-alexa

:robot: Easily test and debug Alexa skills programmatically
https://bespoken.io
Apache License 2.0
112 stars 35 forks source link

How could I use modern Alexa Skill Interaction Model Scheme in Virtual Alexa? #44

Closed hyzhak closed 6 years ago

hyzhak commented 6 years ago

According to How do I use it I should pass 2 separate files: intent scheme and sample utterances. But according to official docs - Interaction Model Schema (Skill Management API) there is only single scheme file. So how could I use that new scheme of Alexa Skill scheme here?

jkelvie commented 6 years ago

We also provide a different method, interactionModelFile. You can pass the new schema format via that. You can see an example here: https://github.com/bespoken/super-simple-unit-testing/blob/master/test/index-test.js

hyzhak commented 6 years ago

@jkelvie and @jperata thanks for the hint! It would be very helpful to have this example in the readme file, because it looks like library obsolete and doesn't support new schema.

Btw you don't need done parameter there, because you already have promises, just return it from those tests.

jkelvie commented 6 years ago

Good suggestion - I added an example with the interaction model file to our latest PR: https://github.com/bespoken/virtual-alexa/blob/MockAlexaAPI/README.md

And I'm aware about the done versus promise. But I prefer to explicitly call done.