Skip to content

Commit f336edf

Browse files
make-github-pseudonymous-againAurélien Ooms
authored and
Aurélien Ooms
committed
🔧 config(cover): Fix coverage report generation.
1 parent 02dd8ca commit f336edf

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

package.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"build-gh-pages": "npm run build-docs",
4343
"ci:test": "npm run lint-config && npm run lint && npm run cover",
4444
"commit-msg": "commitlint --edit",
45-
"cover": "c8 --all --src src --reporter=lcov npm test",
45+
"cover": "NODE_ENV=cover c8 --all --src src --reporter=lcov npm test",
4646
"debug": "NODE_ENV=debug npm run test -- -st --fail-fast",
4747
"dev": "npm run lint-config-and-fix && npm run lint-and-fix && npm run cover -- -- -st --fail-fast",
4848
"install-hooks": "husky install",
@@ -146,6 +146,29 @@
146146
]
147147
]
148148
},
149+
"cover": {
150+
"sourceMaps": "inline",
151+
"presets": [
152+
[
153+
"@babel/preset-env",
154+
{
155+
"targets": "current node"
156+
}
157+
]
158+
],
159+
"plugins": [
160+
[
161+
"transform-remove-console",
162+
{
163+
"exclude": [
164+
"log",
165+
"error",
166+
"warn"
167+
]
168+
}
169+
]
170+
]
171+
},
149172
"development": {
150173
"presets": [
151174
"babel-preset-power-assert"

0 commit comments

Comments
 (0)