Skip to content

Commit ab7b1af

Browse files
committed
Added code coverage with istanbul and coveralls.
1 parent 8e3e8d3 commit ab7b1af

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ node_modules
1515
npm-debug.log
1616
.idea
1717
docs
18-
.DS_Store
18+
.DS_Store
19+
coverage/

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
language: node_js
22
node_js:
33
- 0.10
4+
script:
5+
- npm run coverage
6+
- npm run publish-coverage

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"description": "The Object Document Mapper for LevelGraph based on JSON-LD",
55
"main": "index.js",
66
"scripts": {
7-
"test": "./node_modules/.bin/mocha --recursive test"
7+
"test": "./node_modules/.bin/mocha --recursive test",
8+
"coverage": "rm -rf coverage; istanbul cover _mocha -- --recursive --reporter spec --bail",
9+
"publish-coverage": "cat coverage/lcov.info | coveralls"
810
},
911
"repository": {
1012
"type": "git",
@@ -42,6 +44,8 @@
4244
"levelgraph": "~0.7.1",
4345
"level-test": "~1.5.2",
4446
"chai": "~1.8.1",
45-
"lodash": "~2.4.1"
47+
"lodash": "~2.4.1",
48+
"coveralls": "~2.5.0",
49+
"istanbul": "~0.1.45"
4650
}
4751
}

0 commit comments

Comments
 (0)