Skip to content

Commit

Permalink
[test] Use nyc for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Oct 6, 2017
1 parent 1b99074 commit d417e4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.nyc_output/
coverage/
dist/
npm-debug.log
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ matrix:
fast_finish: true
include:
- node_js: "8"
env: TASK=test-node
env: SCRIPT=test
- node_js: "6"
env: TASK=test-node
env: SCRIPT=test
- node_js: "4"
env: TASK=test-node
env: SCRIPT=test
- node_js: "8"
env:
- secure: IF01oyIKSs0C5dARdYRTilKnU1TG4zenjjEPClkQxAWIpUOxl9xcNJWDVEOPxJ/4pVt+pozyT80Rp7efh6ZiREJIQI1tUboBKSqZzSbnD5uViQNSbQ90PaDP0FIUc0IQ5o07W36rijBB0DTmtU1VofzN9PKkJO7XiSSXevI8RcM=
- SAUCE_USERNAME=url-parse
- TASK=test-browser
- SCRIPT=test-browser
script:
- "npm run ${TASK}"
- "npm run ${SCRIPT}"
after_script:
- 'if [ "${TASK}" == "test-node" ]; then npm i coveralls@3 && cat coverage/lcov.info | coveralls; fi'
- 'if [ "${SCRIPT}" == "test" ]; then npm i coveralls@3 && cat coverage/lcov.info | coveralls; fi'
notifications:
irc:
channels:
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
"description": "Small footprint URL parser that works seamlessly across Node.js and browser environments",
"main": "index.js",
"scripts": {
"100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
"browserify": "mkdir -p dist && browserify index.js -s URLParse -o dist/url-parse.js",
"test-node": "istanbul cover _mocha --report lcovonly -- test/test.js",
"coverage": "istanbul cover _mocha -- test/test.js",
"test": "nyc --reporter=html --reporter=text mocha test/test.js",
"test-browser": "node test/browser.js",
"watch": "mocha --watch test/test.js",
"test": "mocha test/test.js"
"watch": "mocha --watch test/test.js"
},
"repository": {
"type": "git",
Expand All @@ -31,13 +28,13 @@
"license": "MIT",
"dependencies": {
"querystringify": "~1.0.0",
"requires-port": "1.0.x"
"requires-port": "~1.0.0"
},
"devDependencies": {
"assume": "~1.5.0",
"browserify": "~14.4.0",
"istanbul": "0.4.x",
"mocha": "~4.0.0",
"nyc": "~11.2.1",
"pre-commit": "~1.2.0",
"sauce-browsers": "~1.0.0",
"sauce-test": "~1.3.3"
Expand Down

0 comments on commit d417e4f

Please sign in to comment.