Skip to content

Commit

Permalink
add code coverage via coveralls.io
Browse files Browse the repository at this point in the history
  • Loading branch information
erdii committed Oct 27, 2016
1 parent bb397e0 commit d525ae9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ deploy.json
/test/*.js
/lib/*.js
*.log

coverage/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ npm-debug.log
*.yml
coffeelint.json
.editorconfig
coverage/
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ install: npm install
before_script:
- "npm install -g grunt-cli"
- "grunt build"
after_success:
- ./node_modules/.bin/istanbul report text-summary lcov
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node-cache
[![Windows Tests](https://img.shields.io/appveyor/ci/mpneuried/nodecache.svg?label=Windows%20Test)](https://ci.appveyor.com/project/mpneuried/nodecache)
[![Dependency Status](https://david-dm.org/mpneuried/nodecache.svg)](https://david-dm.org/mpneuried/nodecache)
[![NPM version](https://badge.fury.io/js/node-cache.svg)](http://badge.fury.io/js/node-cache)
[![Coveralls Coverage](https://img.shields.io/coveralls/mpneuried/nodecache.svg)](https://coveralls.io/github/mpneuried/nodecache)

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mpneuried/nodecache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Expand Down
5 changes: 4 additions & 1 deletion _src/test/mocha_test.coffee
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
fs = require "fs"

should = require "should"
clone = require "lodash/clone"
{ stringify } = JSON

pkg = require "../package.json"
pkg = JSON.parse fs.readFileSync("package.json")

nodeCache = require "../"
{ randomNumber, randomString, diffKeys } = require "./helpers"

Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,27 @@
"node": ">= 0.4.6"
},
"scripts": {
"test": "mocha test/mocha_test.js",
"test": "COFFEECOV_INIT_ALL=false mocha --compilers coffee:coffee-script/register --require coffee-coverage/register-istanbul _src/test/mocha_test.coffee -R spec",
"build": "grunt build"
},
"dependencies": {
"clone": "2.x",
"lodash": "4.x"
},
"devDependencies": {
"coffee-coverage": "1.x",
"coffee-script": "1.x",
"coveralls": "2.x",
"grunt": "0.4.x",
"grunt-banner": "0.6.x",
"grunt-contrib-clean": "1.0.x",
"grunt-contrib-coffee": "1.0.x",
"grunt-contrib-watch": "^1.0.0",
"grunt-contrib-watch": "1.x",
"grunt-include-replace": "3.2.x",
"grunt-regarde": "0.1.x",
"grunt-run": "0.5.x",
"mocha": "^3.0.2",
"should": "^11.1.0"
"istanbul": "0.x",
"mocha": "3.x",
"should": "11.x"
}
}

0 comments on commit d525ae9

Please sign in to comment.