Browse Source

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: https://github.com/nodejs/node/pull/15194
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
canary-base
Benjamin Coe 7 years ago
committed by Ruben Bridgewater
parent
commit
e9442d1582
No known key found for this signature in database GPG Key ID: F07496B3EB3C1762
  1. 1
      .gitignore
  2. 6
      .nycrc
  3. 2
      Makefile

1
.gitignore

@ -12,6 +12,7 @@
!.gitignore
!.gitkeep
!.mailmap
!.nycrc
!.remarkrc
core

6
.nycrc

@ -0,0 +1,6 @@
{
"exclude": [
"**/internal/process/write-coverage.js"
],
"reporter": ["html", "text"]
}

2
Makefile

@ -166,7 +166,7 @@ coverage-test: coverage-build
$(NODE) ./node_modules/.bin/istanbul-merge --out \
.cov_tmp/libcov.json 'out/Release/.coverage/coverage-*.json'
(cd lib && .$(NODE) ../node_modules/.bin/nyc report \
--temp-directory "$(CURDIR)/.cov_tmp" -r html \
--temp-directory "$(CURDIR)/.cov_tmp" \
--report-dir "../coverage")
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
--gcov-exclude='.*usr' -v -r Release/obj.target/node \

Loading…
Cancel
Save