Skip to content

Commit a799349

Browse files
committed
Replace nyc with c8
1 parent 86e9c9f commit a799349

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1+
coverage/
2+
node_modules/
13
.DS_Store
24
*.log
3-
node_modules/
4-
.nyc_output/
5-
coverage/
65
yarn.lock

cli.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ function transform(options) {
150150

151151
plugins.push([filter, {allow: settings.allow, deny: settings.deny}])
152152

153-
/* istanbul ignore if - hard to check. */
153+
// Hard to check.
154+
/* c8 ignore next 3 */
154155
if (cli.flags.diff) {
155156
plugins.push(diff)
156157
}

filter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ var control = require('remark-message-control')
55
module.exports = filter
66

77
function filter(options) {
8-
var settings = options || /* istanbul ignore next */ {}
8+
/* c8 ignore next */
9+
var settings = options || {}
910

1011
if (settings.allow && settings.deny) {
1112
throw new Error(

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"vfile-sort": "^2.0.0"
8383
},
8484
"devDependencies": {
85-
"nyc": "^15.0.0",
85+
"c8": "^7.10.0",
8686
"prettier": "^2.0.0",
8787
"remark-cli": "^9.0.0",
8888
"remark-preset-wooorm": "^8.0.0",
@@ -92,21 +92,15 @@
9292
},
9393
"scripts": {
9494
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
95-
"test-api": "node test",
96-
"test-coverage": "nyc --reporter lcov tape test/index.js",
95+
"test-api": "node test/index.js",
96+
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
9797
"test": "npm run format && npm run test-coverage"
9898
},
9999
"alex": {
100100
"allow": [
101101
"butt"
102102
]
103103
},
104-
"nyc": {
105-
"check-coverage": true,
106-
"lines": 100,
107-
"functions": 100,
108-
"branches": 100
109-
},
110104
"prettier": {
111105
"tabWidth": 2,
112106
"useTabs": false,

0 commit comments

Comments
 (0)