diff --git a/.gitignore b/.gitignore index 0c664b3..33d4929 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ +coverage/ +node_modules/ .DS_Store *.log -node_modules/ -.nyc_output/ -coverage/ yarn.lock diff --git a/cli.js b/cli.js index ecafcfb..eddd152 100755 --- a/cli.js +++ b/cli.js @@ -150,7 +150,8 @@ function transform(options) { plugins.push([filter, {allow: settings.allow, deny: settings.deny}]) - /* istanbul ignore if - hard to check. */ + // Hard to check. + /* c8 ignore next 3 */ if (cli.flags.diff) { plugins.push(diff) } diff --git a/filter.js b/filter.js index b1a773f..626bac2 100644 --- a/filter.js +++ b/filter.js @@ -5,7 +5,8 @@ var control = require('remark-message-control') module.exports = filter function filter(options) { - var settings = options || /* istanbul ignore next */ {} + /* c8 ignore next */ + var settings = options || {} if (settings.allow && settings.deny) { throw new Error( diff --git a/package.json b/package.json index 7d87229..ff83a37 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "vfile-sort": "^2.0.0" }, "devDependencies": { - "nyc": "^15.0.0", + "c8": "^7.10.0", "prettier": "^2.0.0", "remark-cli": "^9.0.0", "remark-preset-wooorm": "^8.0.0", @@ -92,8 +92,8 @@ }, "scripts": { "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", - "test-api": "node test", - "test-coverage": "nyc --reporter lcov tape test/index.js", + "test-api": "node test/index.js", + "test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api", "test": "npm run format && npm run test-coverage" }, "alex": { @@ -101,12 +101,6 @@ "butt" ] }, - "nyc": { - "check-coverage": true, - "lines": 100, - "functions": 100, - "branches": 100 - }, "prettier": { "tabWidth": 2, "useTabs": false,