Skip to content

Commit 97fdd83

Browse files
committed
adding test coverage with codeclimate
1 parent 082320f commit 97fdd83

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎.travis.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ node_js:
55
- 0.12
66

77
script: npm test
8+
9+
after_script:
10+
- npm run coverage
11+
- npm run codeclimate

‎package.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
"main": "./src/index.js",
66
"bin": "./bin/httpsnippet",
77
"scripts": {
8-
"test": "mocha --recursive --reporter spec"
8+
"test": "mocha --recursive --reporter spec",
9+
"coverage": "mocha -r blanket -R mocha-lcov-reporter > test/report/lcov.info",
10+
"html-cov": "mocha -r blanket -R html-cov > test/report/coverage.html",
11+
"codeclimate": "codeclimate < test/report/lcov.info"
12+
},
13+
"config":{
14+
"blanket": {
15+
"pattern": "src"
16+
}
917
},
1018
"repository": {
1119
"type": "git",
@@ -17,7 +25,10 @@
1725
},
1826
"homepage": "https://github.com/ahmadnassri/httpsnippet",
1927
"devDependencies": {
28+
"blanket": "^1.1.6",
29+
"codeclimate-test-reporter": "0.0.4",
2030
"mocha": "^2.1.0",
31+
"mocha-lcov-reporter": "0.0.2",
2132
"should": "^5.0.1"
2233
},
2334
"dependencies": {

0 commit comments

Comments
 (0)