Skip to content

Commit 5db4a92

Browse files
committed
add links
Signed-off-by: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com>
1 parent 402be75 commit 5db4a92

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apps/site/pages/en/learn/test-runner/collecting-code-coverage.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors: RedYetiDev
66

77
# Collecting code coverage in Node.js
88

9-
Node.js provides built-in support for code coverage through its test runner, which can be enabled using the `--experimental-code-coverage` flag.
9+
Node.js provides built-in support for code coverage through its test runner, which can be enabled using the [`--experimental-code-coverage`](https://nodejs.org/api/cli.html#--experimental-test-coverage) flag.
1010

1111
## What is code coverage?
1212

@@ -205,9 +205,9 @@ Each of these different methods will produce the same report, with 100% code cov
205205

206206
Node.js offers two CLI arguments for managing the inclusion or exclusion of specific files in a coverage report.
207207

208-
The `--test-coverage-include` flag restricts the coverage to files that match the provided glob pattern. By default, files in the `/node_modules/` directory are excluded, but this flag allows you to explicitly include them.
208+
The [`--test-coverage-include`](https://nodejs.org/api/cli.html#--test-coverage-include) flag restricts the coverage to files that match the provided glob pattern. By default, files in the `/node_modules/` directory are excluded, but this flag allows you to explicitly include them.
209209

210-
The `--test-coverage-exclude` flag omits files that match the given glob pattern from the coverage report.
210+
The [`--test-coverage-exclude`](https://nodejs.org/api/cli.html#--test-coverage-exclude) flag omits files that match the given glob pattern from the coverage report.
211211

212212
These flags can be used multiple times, and when both are used together, files must adhere to the inclusion rules, while also avoiding the exclusion rules.
213213

@@ -277,9 +277,9 @@ By default, when all tests pass, Node.js exits with code `0`, which indicates a
277277

278278
Node.js currently supports thresholds for all three of the coverages supported:
279279

280-
- `--test-coverage-lines` for line coverage.
281-
- `--test-coverage-branches` for branch coverage.
282-
- `--test-coverage-functions` for function coverage.
280+
- [`--test-coverage-lines`](https://nodejs.org/api/cli.html#--test-coverage-linesthreshold) for line coverage.
281+
- [`--test-coverage-branches`](https://nodejs.org/api/cli.html#--test-coverage-branchesthreshold) for branch coverage.
282+
- [`--test-coverage-functions`](https://nodejs.org/api/cli.html#--test-coverage-functionsthreshold) for function coverage.
283283

284284
If you wanted to require the previous example to have line coverage >= 90%, you could use the `--test-coverage-lines=90` flag.
285285

0 commit comments

Comments
 (0)