Skip to content

Commit

Permalink
Replace nyc with c8
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 20, 2021
1 parent 86e9c9f commit a799349
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
coverage/
node_modules/
.DS_Store
*.log
node_modules/
.nyc_output/
coverage/
yarn.lock
3 changes: 2 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
3 changes: 2 additions & 1 deletion filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
12 changes: 3 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -92,21 +92,15 @@
},
"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": {
"allow": [
"butt"
]
},
"nyc": {
"check-coverage": true,
"lines": 100,
"functions": 100,
"branches": 100
},
"prettier": {
"tabWidth": 2,
"useTabs": false,
Expand Down

0 comments on commit a799349

Please sign in to comment.