diff --git a/.gitignore b/.gitignore index e094642..aefb31e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ results npm-debug.log /node_modules +/coverage diff --git a/.travis.yml b/.travis.yml index 60d00ce..ad6f166 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,3 +3,5 @@ node_js: - "0.10" - "0.8" - "0.6" +after_script: + - npm run coveralls diff --git a/README.md b/README.md index f22186b..17396f8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://secure.travis-ci.org/selfcontained/deap.svg?branch=master)](http://travis-ci.org/selfcontained/deap) +[![Coverage Status](https://img.shields.io/coveralls/selfcontained/deap.svg)](https://coveralls.io/r/selfcontained/deap?branch=master) === [![browser support](https://ci.testling.com/selfcontained/deap.png)](http://ci.testling.com/selfcontained/deap) diff --git a/package.json b/package.json index 471b0b2..af158a5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "extend and merge objects, deep or shallow", "main": "index.js", "scripts": { - "test": "./node_modules/.bin/mocha test/*.test.js" + "test": "./node_modules/.bin/mocha test/*.test.js", + "coverage": "istanbul cover --report html node_modules/.bin/_mocha", + "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- && cat ./coverage/lcov.info | coveralls" }, "repository": { "type": "git", @@ -34,7 +36,9 @@ "readmeFilename": "README.md", "devDependencies": { "mocha": "~1.9.0", - "chai": "~1.6.0" + "chai": "~1.6.0", + "istanbul": "^0.2.8", + "coveralls": "^2.10.0" }, "testling": { "browsers": [