Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Add nyc and browser code coverage (#169)
Browse files Browse the repository at this point in the history
* remove old coverage setup

* add nyc and coveralls

* temporarily depend on airtap/airtap#coverage

* coverage is opt-in now

* remove faucet

* Switch to airtap@0.0.9
  • Loading branch information
vweevers authored and ralphtheninja committed Jul 4, 2018
1 parent 7b5e87e commit 03ca6d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
coverage
npm-debug.log
.nyc_output
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ matrix:
env: CMD=test
- node_js: 10
env: CMD=test
- node_js: stable
env: CMD=report-coverage
- node_js: stable
env: CMD=test-browsers
addons:
Expand All @@ -24,5 +22,7 @@ matrix:
script:
- DEBUG=airtap:* npm run $CMD

after_success: npm run coverage

notifications:
email: false
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
"safe-buffer": "~5.1.1"
},
"devDependencies": {
"airtap": "^0.0.8",
"faucet": "^0.0.1",
"istanbul": "^0.4.2",
"istanbul-coveralls": "^1.0.3",
"airtap": "0.0.9",
"coveralls": "^3.0.2",
"nyc": "^12.0.2",
"rimraf": "^2.6.2",
"standard": "^11.0.0",
"tape": "^4.8.0"
Expand All @@ -38,11 +37,10 @@
"./immediate.js": "./immediate-browser.js"
},
"scripts": {
"test": "standard && node test.js | faucet",
"test-browsers": "airtap --sauce-connect --loopback airtap.local --no-coverage test.js",
"test-browser-local": "airtap --no-coverage --local 9000 test.js",
"coverage": "istanbul cover -i memdown.js ./node_modules/.bin/tape ./test.js && istanbul check-coverage --lines 90 --function 80 --statements 90 --branches 80",
"report-coverage": "npm run coverage && istanbul-coveralls"
"test": "standard && nyc node test.js",
"test-browsers": "airtap --sauce-connect --loopback airtap.local --coverage test.js",
"test-browser-local": "airtap --coverage --local 9000 test.js",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"license": "MIT",
"engines": {
Expand Down

0 comments on commit 03ca6d2

Please sign in to comment.