Skip to content

Commit 08ae82b

Browse files
committed
build: add coverage reporting
1 parent b5512a6 commit 08ae82b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
coverage
12
node_modules
2-
.DS_Store*
3-
*.log
3+
npm-debug.log

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ matrix:
88
- node_js: "0.11"
99
fast_finish: true
1010
script: "npm run-script test-travis"
11+
after_script: "test $TRAVIS_NODE_VERSION = '0.10' && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
],
1212
"repository": "jshttp/basic-auth",
1313
"devDependencies": {
14+
"istanbul": "0.3.2",
1415
"mocha": "1"
1516
},
1617
"files": [
@@ -23,6 +24,7 @@
2324
},
2425
"scripts": {
2526
"test": "mocha --check-leaks --reporter spec --bail",
26-
"test-travis": "mocha --check-leaks --reporter spec"
27+
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
28+
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
2729
}
2830
}

0 commit comments

Comments
 (0)