From a260190717fcbdd39bd1e508c68e9be7669a990b Mon Sep 17 00:00:00 2001 From: Simon Brewster Date: Tue, 5 Sep 2017 00:10:05 +0200 Subject: [PATCH] doc: instructions for generating coverage reports Add instructions for generating code coverage reports to BUILDING.md PR-URL: https://github.com/nodejs/node/pull/15190 Reviewed-By: Timothy Gu Reviewed-By: Luigi Pinca Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- BUILDING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 1e871cba6d567b..e6579f3e4ef2c1 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -129,6 +129,25 @@ To run the tests: $ make test ``` +To run the tests and generate code coverage reports: + +```console +$ ./configure --coverage +$ make coverage +``` + +This will generate coverage reports for both JavaScript and C++ tests (if you +only want to run the JavaScript tests then you do not need to run the first +command `./configure --coverage`). + +The `make coverage` command downloads some tools to the project root directory +and overwrites the `lib/` directory. To clean up after generating the coverage +reports: + +```console +make coverage-clean +``` + To build the documentation: This will build Node.js first (if necessary) and then use it to build the docs: