Skip to content

Commit 17edfe1

Browse files
committed
add coverage constraints
1 parent 63b6555 commit 17edfe1

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ node_js:
66

77
before_script:
88
- npm run lint
9+
10+
after_script:
11+
- npm run coverage
12+
- npm run update-coveralls
13+
- npm run check-coverage

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Node.js implementation of Stack Exchange's MiniProfiler
44

5+
[![Build Status](https://travis-ci.org/goenning/miniprofiler-node.png)](https://travis-ci.org/goenning/miniprofiler-node)
6+
[![Coverage Status](https://coveralls.io/repos/github/goenning/miniprofiler-node/badge.svg?branch=master)](https://coveralls.io/github/goenning/miniprofiler-node?branch=master)
7+
![Dependencies](https://david-dm.org/goenning/miniprofiler-node.svg)
58
### This is working, but not yet considered production ready. Use with caution.
69

710
# requirements
@@ -26,4 +29,6 @@ Things to do:
2629
- storing of client timings on first result postback (there's a todo in the `results` function about where to do this)
2730
- document more things
2831
- add providers for pg, mongodb, mysql, redis and more
29-
- add eslint to travis
32+
- add coverage badge
33+
- add npm package version badge
34+
- add dependencies status badge

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
"lint": "eslint .",
88
"test": "mocha tests/",
99
"test:watch": "mocha tests/ --watch",
10-
"coverage": "istanbul cover node_modules/mocha/bin/_mocha tests/",
11-
"example": "node examples/express/server.js"
10+
"example": "node examples/express/server.js",
11+
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha -- tests/ -R spec",
12+
"check-coverage": "istanbul check-coverage --statements 70 --branches 70 --functions 70 --lines 70",
13+
"update-coveralls": "cat coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js"
1214
},
1315
"repository": {
1416
"type": "git",
@@ -24,6 +26,7 @@
2426
},
2527
"devDependencies": {
2628
"chai": "^3.5.0",
29+
"coveralls": "^2.11.9",
2730
"eslint": "^2.10.2",
2831
"express": "^4.13.4",
2932
"istanbul": "^0.4.3",

0 commit comments

Comments
 (0)