doc: instructions for generating coverage reports · nodejs/node@a260190

Original file line numberDiff line numberDiff line change

@@ -129,6 +129,25 @@ To run the tests:

129129

$ make test

130130

```

131131
132+

To run the tests and generate code coverage reports:

133+
134+

```console

135+

$ ./configure --coverage

136+

$ make coverage

137+

```

138+
139+

This will generate coverage reports for both JavaScript and C++ tests (if you

140+

only want to run the JavaScript tests then you do not need to run the first

141+

command `./configure --coverage`).

142+
143+

The `make coverage` command downloads some tools to the project root directory

144+

and overwrites the `lib/` directory. To clean up after generating the coverage

145+

reports:

146+
147+

```console

148+

make coverage-clean

149+

```

150+
132151

To build the documentation:

133152
134153

This will build Node.js first (if necessary) and then use it to build the docs: