Skip to content

Commit 496ec56

Browse files
authored
Merge pull request #1 from eithe/code-coverage
Add code coverage using Instabul and Coveralls
2 parents 6fc435a + 7319411 commit 496ec56

File tree

6 files changed

+644
-24
lines changed

6 files changed

+644
-24
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
node_modules
2+
.nyc_output
3+
.coveralls.yml

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ test/
2525
template.readme.md
2626
#CI
2727
.travis.yml
28+
.coveralls.yml
2829
#project styles
2930
.eslintrc.js
3031
.prettierrc.js

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
language: node_js
22
node_js:
3-
- "node"
3+
- "node"
4+
after_success: npm run coverage

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Build Status](https://travis-ci.com/eithe/node-red-contrib-jsonstat.svg?branch=master)](https://travis-ci.com/eithe/node-red-contrib-jsonstat)
1+
[![Build Status](https://travis-ci.com/eithe/node-red-contrib-jsonstat.svg?branch=master)](https://travis-ci.com/eithe/node-red-contrib-jsonstat)
2+
[![Coverage Status](https://coveralls.io/repos/github/eithe/node-red-contrib-jsonstat/badge.svg?branch=code-coverage)](https://coveralls.io/github/eithe/node-red-contrib-jsonstat?branch=code-coverage)
23

34
# jsonstat nodes for Node-RED
45

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@
88
"dependencies": {
99
"jsonstat": "0.13.3"
1010
},
11-
"keywords": [
12-
"node-red",
13-
"jsonstat"
14-
],
1511
"devDependencies": {
12+
"coveralls": "^3.0.2",
1613
"mocha": "~5.2.0",
1714
"node-red": "~0.19.5",
18-
"node-red-node-test-helper": "~0.1.8"
15+
"node-red-node-test-helper": "~0.1.8",
16+
"nyc": "^13.1.0"
1917
},
18+
"keywords": [
19+
"node-red",
20+
"jsonstat"
21+
],
2022
"scripts": {
21-
"test": "mocha \"test/**/*_spec.js\""
23+
"test": "nyc mocha \"test/**/*_spec.js\"",
24+
"coverage": "nyc report --reporter=text-lcov | coveralls"
2225
},
2326
"node-red": {
2427
"nodes": {
2528
"jsonstat-data": "nodes/jsonstat-data.js",
2629
"jsonstat-category": "nodes/jsonstat-category.js"
2730
}
2831
}
29-
}
32+
}

0 commit comments

Comments
 (0)