Replace nyc
with c8
This commit is contained in:
parent
e671b71418
commit
1d5afb9f28
3 changed files with 9 additions and 14 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,6 +1,5 @@
|
|||
.DS_Store
|
||||
*.log
|
||||
.nyc_output/
|
||||
coverage/
|
||||
node_modules/
|
||||
.DS_Store
|
||||
*.log
|
||||
yarn.lock
|
||||
|
|
6
index.js
6
index.js
|
@ -11,7 +11,8 @@ module.exports = directive
|
|||
function directive() {
|
||||
var data = this.data()
|
||||
|
||||
/* istanbul ignore next - old remark. */
|
||||
// Old remark.
|
||||
/* c8 ignore next 14 */
|
||||
if (
|
||||
!warningIssued &&
|
||||
((this.Parser &&
|
||||
|
@ -32,7 +33,8 @@ function directive() {
|
|||
add('toMarkdownExtensions', toMarkdown)
|
||||
|
||||
function add(field, value) {
|
||||
/* istanbul ignore if - other extensions. */
|
||||
// Other extensions.
|
||||
/* c8 ignore next */
|
||||
if (data[field]) data[field].push(value)
|
||||
else data[field] = [value]
|
||||
}
|
||||
|
|
12
package.json
12
package.json
|
@ -34,10 +34,10 @@
|
|||
"micromark-extension-directive": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"c8": "^7.0.0",
|
||||
"dtslint": "^4.0.0",
|
||||
"is-hidden": "^1.0.0",
|
||||
"not": "^0.1.0",
|
||||
"nyc": "^15.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark": "^13.0.0",
|
||||
"remark-cli": "^9.0.0",
|
||||
|
@ -49,17 +49,11 @@
|
|||
},
|
||||
"scripts": {
|
||||
"format": "remark . -qfo --ignore-pattern test/ && prettier . -w --loglevel warn && xo --fix",
|
||||
"test-api": "node test",
|
||||
"test-coverage": "nyc --reporter lcov tape test/index.js",
|
||||
"test-api": "node --conditions development test/index.js",
|
||||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
|
||||
"test-types": "dtslint types",
|
||||
"test": "npm run format && npm run test-coverage && npm run test-types"
|
||||
},
|
||||
"nyc": {
|
||||
"check-coverage": true,
|
||||
"lines": 100,
|
||||
"functions": 100,
|
||||
"branches": 100
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
|
|
Loading…
Add table
Reference in a new issue