From 21ff501bae76d782f1bf11c482e39b7e1a55930b Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 18 Aug 2017 22:01:23 -0400 Subject: [PATCH] build: use nyc for test coverage --- .gitignore | 5 +++-- .travis.yml | 2 +- package.json | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 84a4863..f15b98e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -coverage -node_modules +.nyc_output/ +coverage/ +node_modules/ npm-debug.log package-lock.json diff --git a/.travis.yml b/.travis.yml index d3aa9ca..5f9f35a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,4 +16,4 @@ before_install: - "test ! -d node_modules || npm rebuild" after_script: # Report coverage - - "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 0c0a87e..92c4398 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,13 @@ "body-parser": "1.17.2", "eslint": "2.13.1", "express": "^4.12.4", - "istanbul": "^0.4.5", "mocha": "3.4.2", + "nyc": "10.3.2", "should": "11.2.1", "supertest": "1.2.0" }, "scripts": { - "test": "npm run lint && istanbul cover node_modules/mocha/bin/_mocha", + "test": "npm run lint && nyc --reporter=html --reporter=text mocha", "lint": "eslint lib test" } }