Add nyc coverage, report data to coveralls.io

This commit is contained in:
Miroslav Bajtoš 2017-01-31 13:22:22 +01:00
parent c7e0a15a44
commit 7eeadc4289
4 changed files with 13 additions and 1 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
node_modules node_modules
dist dist
*xunit.xml *xunit.xml
.nyc_output/

7
.nycrc Normal file
View File

@ -0,0 +1,7 @@
{
"exclude": [
"Gruntfile.js",
"test/**/*.js"
],
"cache": true
}

View File

@ -4,4 +4,5 @@ node_js:
- "4" - "4"
- "6" - "6"
- "7" - "7"
after_success: npm run coverage

View File

@ -30,7 +30,8 @@
], ],
"scripts": { "scripts": {
"lint": "grunt eslint", "lint": "grunt eslint",
"test": "grunt mocha-and-karma" "coverage": "nyc report --reporter=text-lcov | coveralls",
"test": "nyc grunt mocha-and-karma"
}, },
"engines": { "engines": {
"node": ">=4.0.0" "node": ">=4.0.0"
@ -65,6 +66,7 @@
"browserify": "^13.1.0", "browserify": "^13.1.0",
"chai": "^3.5.0", "chai": "^3.5.0",
"cookie-parser": "^1.3.4", "cookie-parser": "^1.3.4",
"coveralls": "^2.11.15",
"dirty-chai": "^1.2.2", "dirty-chai": "^1.2.2",
"eslint-config-loopback": "^8.0.0", "eslint-config-loopback": "^8.0.0",
"express-session": "^1.14.0", "express-session": "^1.14.0",
@ -89,6 +91,7 @@
"loopback-boot": "^2.7.0", "loopback-boot": "^2.7.0",
"loopback-context": "^1.0.0", "loopback-context": "^1.0.0",
"mocha": "^3.0.0", "mocha": "^3.0.0",
"nyc": "^10.1.2",
"phantomjs-prebuilt": "^2.1.7", "phantomjs-prebuilt": "^2.1.7",
"sinon": "^1.13.0", "sinon": "^1.13.0",
"sinon-chai": "^2.8.0", "sinon-chai": "^2.8.0",