test: Configure coverage script

This commit is contained in:
Mariusz Nowak
2024-05-23 21:57:32 +02:00
parent 18663c1e9f
commit 4351cc5ece
2 changed files with 18 additions and 0 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
/.nyc_output
/coverage
/node_modules
npm-debug.log
/package-lock.json

View File

@@ -35,6 +35,7 @@
"bluebird": "^3.7.2",
"eslint": "^8.57.0",
"eslint-config-medikoo": "^4.2.0",
"nyc": "^15.1.0",
"plain-promise": "^0.1.1",
"prettier-elastic": "^3.2.5",
"tad": "^3.1.1"
@@ -50,6 +51,20 @@
"max-lines-per-function": "off"
}
},
"nyc": {
"all": true,
"exclude": [
".github",
"coverage/**",
"test/**",
"*.config.js"
],
"reporter": [
"lcov",
"html",
"text-summary"
]
},
"prettier": {
"printWidth": 100,
"tabWidth": 4,
@@ -66,6 +81,7 @@
]
},
"scripts": {
"coverage": "nyc npm test",
"lint": "eslint --ignore-path=.gitignore .",
"lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'",
"prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",