diff --git a/.gitignore b/.gitignore index d7e3a4e..09b743b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .DS_Store *.log node_modules +coverage +.nyc_output diff --git a/.travis.yml b/.travis.yml index 0498cd7..719dbf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,12 @@ sudo: false language: node_js +script: + - npm run-script coverage + +after_script: + - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + node_js: - '0.10' - '0.12' diff --git a/CHANGELOG.md b/CHANGELOG.md index 84525e3..6ac1646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Next +* [#23](https://github.com/alexa-js/alexa-utterances/issues/23): Added code coverage - [@dblock](https://github.com/dblock). * Your contribution here. ### 0.2.1 diff --git a/README.md b/README.md index daa3746..8d3f516 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![NPM](https://img.shields.io/npm/v/alexa-utterances.svg)](https://www.npmjs.com/package/alexa-utterances/) [![build Status](https://travis-ci.org/alexa-js/alexa-utterances.svg?branch=master)](https://travis-ci.org/alexa-js/alexa-utterances) +[![Coverage Status](https://coveralls.io/repos/github/alexa-js/alexa-utterances/badge.svg?branch=master)](https://coveralls.io/github/alexa-js/alexa-utterances?branch=master) Generate expanded Amazon Alexa utterances from a template string. diff --git a/package.json b/package.json index 00f32c7..b2662b2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "prepublish": "npm test", - "test": "tap ./test" + "test": "tap ./test", + "coverage": "tap ./test --coverage --coverage-report=lcov" }, "repository": { "type": "git", @@ -29,6 +30,7 @@ "numbered": "^1.0.0" }, "devDependencies": { - "tap": "^8.0.1" + "tap": "^8.0.1", + "coveralls": "^2.11.15" } }