Skip to content

Commit e6b905a

Browse files
committed
- implemented test coverage
1 parent bffbaef commit e6b905a

4 files changed

Lines changed: 376 additions & 3 deletions

File tree

.coveralls.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
service_name: travis-ci

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ deploy:
1919
on:
2020
tags: true
2121

22+
after_success:
23+
- npm run test-coverage
24+
2225
notifications:
2326
email:
2427
- chr.rust@googlemail.com

docs/report/coverage.html

Lines changed: 354 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@
5454
},
5555
"devDependencies" : {
5656

57-
"mocha" : "1.17.x"
57+
"mocha" : "1.17.x",
58+
"mocha-lcov-reporter" : "0.0.x",
59+
"coveralls" : "2.7.x",
60+
"blanket" : "1.1.x"
5861

5962
},
6063

@@ -68,10 +71,22 @@
6871

6972
"main" : "./dips.js",
7073

74+
"config" : {
75+
76+
"blanket" : {
77+
78+
"pattern" : "src"
79+
80+
}
81+
82+
},
83+
7184
"scripts" : {
7285

73-
"test" : "NODE_ENV=test ./node_modules/.bin/mocha --reporter spec --ui tdd --timeout 5000 --slow 100 --colors --bail --recursive test/",
74-
"build-doc" : "jsdoc --destination docs --recurse --private lib/ dips.js"
86+
"test" : "./node_modules/.bin/mocha --reporter spec --ui tdd --timeout 5000 --slow 100 --colors --bail --recursive test/",
87+
"test-coverage" : "./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter --ui tdd | ./node_modules/coveralls/bin/coveralls.js",
88+
"coverage" : "./node_modules/.bin/mocha --require blanket --reporter html-cov --ui tdd > docs/report/coverage.html",
89+
"build-doc" : "jsdoc --destination docs --recurse --private lib/ dips.js"
7590

7691
}
7792

0 commit comments

Comments
 (0)