Skip to content
Browse files

Merge pull request #541 from shutterstock/feature/test-coverage

add coverage
  • Loading branch information...
2 parents 260263c + 179f13f commit 90852d823f0f11ad12842908bec30d740234d785 @cesine cesine committed Apr 8, 2016
Showing with 19 additions and 5 deletions.
  1. +5 −0 .gitignore
  2. +3 −1 .travis.yml
  3. +3 −0 README.md
  4. +8 −4 package.json
View
5 .gitignore
@@ -1,3 +1,8 @@
*.log
*swp
+
+# Dependency directories
node_modules
+
+# Coverage directory used by tools like istanbul
+coverage
View
4 .travis.yml
@@ -3,4 +3,6 @@ node_js:
- "4"
after_script:
- npm run build
+ - npm run build
+ - npm run coverage
+ - npm run coveralls
View
3 README.md
@@ -1,5 +1,6 @@
[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coverage-image]][coverage-url]
# Rickshaw
@@ -223,3 +224,5 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
[npm-url]: https://npmjs.org/package/rickshaw
[travis-image]: https://travis-ci.org/shutterstock/rickshaw.svg?branch=master
[travis-url]: https://travis-ci.org/shutterstock/rickshaw
+[coverage-image]: https://coveralls.io/repos/github/shutterstock/rickshaw/badge.svg?branch=feature%2Ftest-coverage
+[coverage-url]: https://coveralls.io/github/shutterstock/rickshaw?branch=feature%2Ftest-coverage
View
12 package.json
@@ -25,15 +25,19 @@
"node": ">= 4.0.0"
},
"devDependencies": {
+ "clean-css": "^3.4.10",
+ "coveralls": "^2.11.9",
+ "istanbul": "^0.4.3",
"jsdom": "^8.1.0",
+ "jshint": "^2.9.1",
"nodeunit": "^0.9.1",
- "clean-css": "^3.4.10",
- "uglify-js": "^2.6.2",
- "jshint": "^2.9.1"
+ "uglify-js": "^2.6.2"
},
"scripts": {
"build": "make clean && make",
"examples": "open examples/index.html",
- "test": "nodeunit tests"
+ "test": "nodeunit tests",
+ "coverage": "istanbul cover nodeunit tests --reporter=lcov",
+ "coveralls": "cat ./coverage/lcov.info | coveralls"
}
}

0 comments on commit 90852d8

Please sign in to comment.
Something went wrong with that request. Please try again.