Add nyc coverage, report data to coveralls.io

This commit is contained in:
Miroslav Bajtoš 2017-08-30 14:13:52 +02:00
parent 666f9c5d5b
commit d49806a78b
No known key found for this signature in database
GPG Key ID: 6F2304BA9361C7E3
4 changed files with 13 additions and 1 deletions

1
.gitignore vendored
View File

@ -12,5 +12,6 @@ docs/man
npm-debug.log npm-debug.log
.project .project
test/memory.json test/memory.json
.nyc_output

6
.nycrc Normal file
View File

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

View File

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

View File

@ -26,16 +26,19 @@
"depd": "./lib/browser.depd.js" "depd": "./lib/browser.depd.js"
}, },
"scripts": { "scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"lint": "eslint .", "lint": "eslint .",
"test": "mocha", "test": "nyc mocha",
"posttest": "npm run lint" "posttest": "npm run lint"
}, },
"devDependencies": { "devDependencies": {
"async-iterators": "^0.2.2", "async-iterators": "^0.2.2",
"coveralls": "^2.13.1",
"eslint": "^3.12.2", "eslint": "^3.12.2",
"eslint-config-loopback": "^8.0.0", "eslint-config-loopback": "^8.0.0",
"loopback-connector-throwing": "file:./test/fixtures/loopback-connector-throwing", "loopback-connector-throwing": "file:./test/fixtures/loopback-connector-throwing",
"mocha": "^3.2.0", "mocha": "^3.2.0",
"nyc": "^11.1.0",
"should": "^8.4.0" "should": "^8.4.0"
}, },
"dependencies": { "dependencies": {