Skip to content

Commit 7eeadc4

Browse files
committed
Add nyc coverage, report data to coveralls.io
1 parent c7e0a15 commit 7eeadc4

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
node_modules
1414
dist
1515
*xunit.xml
16+
.nyc_output/

.nycrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"exclude": [
3+
"Gruntfile.js",
4+
"test/**/*.js"
5+
],
6+
"cache": true
7+
}

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ node_js:
44
- "4"
55
- "6"
66
- "7"
7+
after_success: npm run coverage
78

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
],
3131
"scripts": {
3232
"lint": "grunt eslint",
33-
"test": "grunt mocha-and-karma"
33+
"coverage": "nyc report --reporter=text-lcov | coveralls",
34+
"test": "nyc grunt mocha-and-karma"
3435
},
3536
"engines": {
3637
"node": ">=4.0.0"
@@ -65,6 +66,7 @@
6566
"browserify": "^13.1.0",
6667
"chai": "^3.5.0",
6768
"cookie-parser": "^1.3.4",
69+
"coveralls": "^2.11.15",
6870
"dirty-chai": "^1.2.2",
6971
"eslint-config-loopback": "^8.0.0",
7072
"express-session": "^1.14.0",
@@ -89,6 +91,7 @@
8991
"loopback-boot": "^2.7.0",
9092
"loopback-context": "^1.0.0",
9193
"mocha": "^3.0.0",
94+
"nyc": "^10.1.2",
9295
"phantomjs-prebuilt": "^2.1.7",
9396
"sinon": "^1.13.0",
9497
"sinon-chai": "^2.8.0",

0 commit comments

Comments
 (0)