diff --git a/.travis.yml b/.travis.yml index fbc2c5d..24902c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ language: node_js - node_js: - stable - install: - npm install script: - - npm test + - npm run cover + +# Send coverage data to Coveralls +after_script: "cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js" diff --git a/README.md b/README.md index 5b85bac..aeee510 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # Relative Date + +[![Build Status](https://travis-ci.org/samrith-s/relative_date.svg?branch=master)](https://travis-ci.org/samrith-s/relative_date) [![Coverage Status](https://coveralls.io/repos/github/samrith-s/relative_date/badge.svg)](https://coveralls.io/github/samrith-s/relative_date) diff --git a/package.json b/package.json index b2deaf7..ecb8d65 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "A tiny package which, when given a date, displays it with relation to the current day.", "main": "relative_date.js", "scripts": { - "test": "mocha -R nyan" + "test": "mocha -R nyan", + "cover": "node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- -R spec test/*" }, "repository": { "type": "git", @@ -40,6 +41,8 @@ }, "devDependencies": { "chai": "^4.0.0", + "coveralls": "^2.13.1", + "istanbul": "^0.4.5", "mocha": "^3.4.2" } }