Skip to content

Commit

Permalink
coverage: Use nyc to be able to get the reports locally
Browse files Browse the repository at this point in the history
  • Loading branch information
meschbach committed Apr 23, 2019
1 parent c688658 commit eefb086
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules/
package-lock.json
.idea/
docs/
docs/
.nyc_output
coverage
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ tests/
.travis.yml
.idea/
docs/
.esdoc.json
.esdoc.json
.nyc_output
coverage
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ node_js:
jobs:
include:
- stage: Produce Coverage
node_js: node
script: npm install coveralls istanbul mocha-lcov-reporter && istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec tests && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
node_js: "11"
script: npm run coverage && npm run coveralls
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
"description": "A bucket of code to make NodeJS easier",
"main": "index.js",
"scripts": {
"test": "mocha tests --recursive"
"test": "mocha tests --recursive",
"coverage": "nyc --reporter=html --reporter=text mocha tests --recursive",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"author": "Mark Eschbach <meschbach@gmail.com>",
"license": "MIT",
"devDependencies": {
"chai": "4",
"chai-string": "1",
"coveralls": "3.0.3",
"express": ">=4.16.0",
"mocha": "6"
"mocha": "6",
"nyc": "14.0.0"
},
"repository": "meschbach/js-junk-bucket"
}

0 comments on commit eefb086

Please sign in to comment.