Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v18.x backport] test_runner features #46839

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9ec0a4e
test_runner: avoid swallowing of asynchronously thrown errors
fossamagna Nov 7, 2022
7201845
test_runner: add reporters
MoLow Dec 19, 2022
a34809a
module: move test reporter loading
GeoffreyBooth Dec 22, 2022
b628161
test_runner: report `file` in test runner events
MoLow Jan 2, 2023
6d9ec6c
test_runner: make built in reporters internal
cjihrig Jan 6, 2023
6cb8f02
test_runner: add initial code coverage support
cjihrig Dec 21, 2022
8ad7668
doc,lib,src,test: rename --test-coverage
cjihrig Jan 8, 2023
95250e1
test: fix tap escaping with and without --test
pulkit-30 Jan 28, 2023
e1f5a3a
test_runner: top-level diagnostics not ommited when running with --test
pulkit-30 Feb 2, 2023
f4264f0
test_runner: fix missing test diagnostics
MoLow Feb 2, 2023
9c49554
test: fix tap parser fails if a test logs a number
pulkit-30 Feb 6, 2023
1502aca
test_runner: allow nesting test within describe
MoLow Feb 17, 2023
f7d8bed
test_runner: flatten TAP output when running using `--test`
MoLow Feb 18, 2023
730f11f
test_runner: parse non-ascii character correctly
mertcanaltin Feb 18, 2023
4a63d24
test_runner: display skipped tests in spec reporter output
richiemccoll Feb 18, 2023
32a0802
test_runner: centralize CLI option handling
cjihrig Feb 20, 2023
b50cfb3
test_runner: emit test-only diagnostic warning
richiemccoll Feb 21, 2023
69100c9
test_runner: bootstrap reporters before running tests
MoLow Feb 19, 2023
6ef4886
test_runner: add `describe.only` and `it.only` shorthands
richiemccoll Feb 21, 2023
b7aefcb
test_runner: better handle async bootstrap errors
cjihrig Feb 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,17 @@ the ability to import a directory that has an index file.

See [customizing ESM specifier resolution][] for example usage.

### `--experimental-test-coverage`

<!-- YAML
added: REPLACEME
-->

When used in conjunction with the `node:test` module, a code coverage report is
generated as part of the test runner output. If no tests are run, a coverage
report is not generated. See the documentation on
[collecting code coverage from tests][] for more details.

### `--experimental-vm-modules`

<!-- YAML
Expand Down Expand Up @@ -1219,6 +1230,24 @@ A regular expression that configures the test runner to only execute tests
whose name matches the provided pattern. See the documentation on
[filtering tests by name][] for more details.

### `--test-reporter`

<!-- YAML
added: REPLACEME
-->

A test reporter to use when running tests. See the documentation on
[test reporters][] for more details.

### `--test-reporter-destination`

<!-- YAML
added: REPLACEME
-->

The destination for the corresponding test reporter. See the documentation on
[test reporters][] for more details.

### `--test-only`

<!-- YAML
Expand Down Expand Up @@ -2295,6 +2324,7 @@ done
[`unhandledRejection`]: process.md#event-unhandledrejection
[`v8.startupSnapshot` API]: v8.md#startup-snapshot-api
[`worker_threads.threadId`]: worker_threads.md#workerthreadid
[collecting code coverage from tests]: test.md#collecting-code-coverage
[conditional exports]: packages.md#conditional-exports
[context-aware]: addons.md#context-aware-addons
[customizing ESM specifier resolution]: esm.md#customizing-esm-specifier-resolution-algorithm
Expand All @@ -2309,6 +2339,7 @@ done
[scavenge garbage collector]: https://v8.dev/blog/orinoco-parallel-scavenger
[security warning]: #warning-binding-inspector-to-a-public-ipport-combination-is-insecure
[semi-space]: https://www.memorymanagement.org/glossary/s.html#semi.space
[test reporters]: test.md#test-reporters
[timezone IDs]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
[tracking issue for user-land snapshots]: https://github.com/nodejs/node/issues/44014
[ways that `TZ` is handled in other environments]: https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
Loading