From 54b7275c0953b7635922ad2c268c4c096aa773a3 Mon Sep 17 00:00:00 2001 From: Mathias Schreck Date: Fri, 2 Mar 2018 15:18:33 +0100 Subject: [PATCH] Use nyc instead of istanbul --- .gitignore | 1 + .istanbul.yml | 19 ------------------- package.json | 27 +++++++++++++++++++++++---- 3 files changed, 24 insertions(+), 23 deletions(-) delete mode 100644 .istanbul.yml diff --git a/.gitignore b/.gitignore index 2e30d5c..52bf24d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules build/ .idea/ *.log +.nyc_output/ diff --git a/.istanbul.yml b/.istanbul.yml deleted file mode 100644 index acd68cf..0000000 --- a/.istanbul.yml +++ /dev/null @@ -1,19 +0,0 @@ -instrumentation: - root: . - default-excludes: true - excludes: - - '.idea/**' - - 'build/**' - embed-source: false - complete-copy: false - include-all-sources: true -reporting: - print: summary - reporty: - - lcov - dir: ./build/coverage - watermarks: - statements: [99, 100] - lines: [99, 100] - functions: [99, 100] - branches: [99, 100] diff --git a/package.json b/package.json index 26ed349..8ac12b8 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "main": "index.js", "scripts": { "pretest": "eslint .", - "test": "npm run test:unit --coverage && npm run check-coverage", - "test:unit": "istanbul test _mocha test -- --recursive --reporter dot", - "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100 --lines 100", + "test": "npm run test:unit:with-coverage", + "test:unit": "mocha test --recursive --reporter dot", + "test:unit:with-coverage": "nyc npm run test:unit", "coveralls": "cat ./build/coverage/lcov.info | coveralls", "changelog": "pr-log" }, @@ -19,6 +19,7 @@ "pr-log": "^2.0.0", "istanbul": "^0.4.2", "mocha": "^5.0.1", + "nyc": "^11.4.1", "eslint": "^4.0.0", "coveralls": "^3.0.0" }, @@ -43,5 +44,23 @@ "eslintplugin", "eslint-plugin", "mocha" - ] + ], + "nyc": { + "all": true, + "cache": false, + "lines": 100, + "statements": 100, + "functions": 100, + "branches": 100, + "exclude": [ + "build", + "test" + ], + "reporter": [ + "lcov", + "text-summary" + ], + "check-coverage": true, + "report-dir": "build" + } }