Skip to content

jjbskir/alexa-skill-unit-tests-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit testing an Amazon Alexa skill with Node.js and Jasmine.

A simple Amazon Alexa skill that demonstrates how to write unit tests with Jasmine. Read the companion article at medium.com.

Concepts

  1. How to write a unit test around an Amazon Alexa skill intent.
  2. Mocking requests and responses.
  3. Testing if SSML responses are valid.

Setup

  1. Clone the git project. Project was built using node version 4.2.6.
  2. Go to the project directory cd alexa-skill-unit-tests-js
  3. Install node modules npm i
  4. Set up Jasmine npm i jasmine-node -g
  5. Run tests jasmine-node spec/

TODO

  1. Card validator.
  2. Max length of speech and card validator.
  3. SSML attribute value validator.
  4. Validate all SSML tags get closed properly.
  5. Unit tests around validators.

Further Reading

  1. Hello World Application
  2. Jasmine Documentation
  3. Speech Synthesis Markup Language
  4. Alexa Response Constraints

About

A simple Amazon Alexa skill that demonstrates how to write unit tests with Jasmine. Developed while working on the Alexa skill Chef Basil.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published