Skip to content

Commit ac459c3

Browse files
Benjamin CoeMylesBorins
Benjamin Coe
authored andcommitted
test: exclude write-coverage from coverage report
Added a .nyrc configuration file that can be used to configure test coverage. Added an exclude rule that removes write-coverage.js from coverage reports. Pulled reporter configuration into .nycrc and added an additional text reporter. PR-URL: #15194 Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 63c542a commit ac459c3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
!.gitignore
1313
!.gitkeep
1414
!.mailmap
15+
!.nycrc
1516
!.remarkrc
1617

1718
core

.nycrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"exclude": [
3+
"**/internal/process/write-coverage.js"
4+
],
5+
"reporter": ["html", "text"]
6+
}

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ coverage-test: coverage-build
166166
$(NODE) ./node_modules/.bin/istanbul-merge --out \
167167
.cov_tmp/libcov.json 'out/Release/.coverage/coverage-*.json'
168168
(cd lib && .$(NODE) ../node_modules/.bin/nyc report \
169-
--temp-directory "$(CURDIR)/.cov_tmp" -r html \
169+
--temp-directory "$(CURDIR)/.cov_tmp" \
170170
--report-dir "../coverage")
171171
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
172172
--gcov-exclude='.*usr' -v -r Release/obj.target/node \

0 commit comments

Comments
 (0)