diff --git a/.eslintignore b/.eslintignore index 62562b7..76b1021 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ +.nyc_output coverage node_modules diff --git a/.gitignore b/.gitignore index 116220c..2d8d77e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.nyc_output/ coverage/ node_modules/ package-lock.json diff --git a/.travis.yml b/.travis.yml index 973c9f6..9042222 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,17 +23,15 @@ before_install: - "npm rm --save-dev beautify-benchmark" # Setup Node.js version-specific dependencies - - "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev istanbul" - - "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul" - "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev $(grep -E '\"eslint\\S*\"' package.json | cut -d'\"' -f2)" # Update Node.js modules - "test ! -d node_modules || npm prune" - "test ! -d node_modules || npm rebuild" script: - # Run test script, depending on istanbul install - - "test ! -z $(npm -ps ls istanbul) || npm test" - - "test -z $(npm -ps ls istanbul) || npm run-script test-travis" - - "test -z $(npm -ps ls eslint ) || npm run-script lint" + # Run test script, depending on nyc install + - "test ! -z $(npm -ps ls nyc) || npm test" + - "test -z $(npm -ps ls nyc) || npm run-script test-travis" + - "test -z $(npm -ps ls eslint) || npm run-script lint" after_script: - - "test -e ./coverage/lcov.info && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls" + - "test -d .nyc_output && npm install coveralls@2 && nyc report --reporter=text-lcov | coveralls" diff --git a/package.json b/package.json index 400f6db..380f058 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "eslint-plugin-node": "5.1.1", "eslint-plugin-promise": "3.5.0", "eslint-plugin-standard": "3.0.1", - "istanbul": "0.4.5", - "mocha": "3.5.0" + "mocha": "3.5.0", + "nyc": "10.3.2" }, "files": [ "LICENSE", @@ -39,7 +39,7 @@ "bench": "node benchmark/index.js", "lint": "eslint .", "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + "test-cov": "nyc --reporter=text npm test", + "test-travis": "nyc --reporter=html --reporter=text npm test" } }