Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 27f195f

Browse filesBrowse files
committed
doc: document watch option for node:test run()
PR-URL: #48256 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 93f77cb commit 27f195f
Copy full SHA for 27f195f

File tree

Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed
Open diff view settings
Collapse file

‎doc/api/test.md‎

Copy file name to clipboardExpand all lines: doc/api/test.md
+9-8Lines changed: 9 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -727,25 +727,26 @@ changes:
727727
**Default:** `false`.
728728
* `files`: {Array} An array containing the list of files to run.
729729
**Default** matching files from [test runner execution model][].
730-
* `setup` {Function} A function that accepts the `TestsStream` instance
731-
and can be used to setup listeners before any tests are run.
732-
**Default:** `undefined`.
733-
* `signal` {AbortSignal} Allows aborting an in-progress test execution.
734-
* `timeout` {number} A number of milliseconds the test execution will
735-
fail after.
736-
If unspecified, subtests inherit this value from their parent.
737-
**Default:** `Infinity`.
738730
* `inspectPort` {number|Function} Sets inspector port of test child process.
739731
This can be a number, or a function that takes no arguments and returns a
740732
number. If a nullish value is provided, each process gets its own port,
741733
incremented from the primary's `process.debugPort`.
742734
**Default:** `undefined`.
735+
* `setup` {Function} A function that accepts the `TestsStream` instance
736+
and can be used to setup listeners before any tests are run.
737+
**Default:** `undefined`.
738+
* `signal` {AbortSignal} Allows aborting an in-progress test execution.
743739
* `testNamePatterns` {string|RegExp|Array} A String, RegExp or a RegExp Array,
744740
that can be used to only run tests whose name matches the provided pattern.
745741
Test name patterns are interpreted as JavaScript regular expressions.
746742
For each test that is executed, any corresponding test hooks, such as
747743
`beforeEach()`, are also run.
748744
**Default:** `undefined`.
745+
* `timeout` {number} A number of milliseconds the test execution will
746+
fail after.
747+
If unspecified, subtests inherit this value from their parent.
748+
**Default:** `Infinity`.
749+
* `watch` {boolean} Whether to run in watch mode or not. **Default:** `false`.
749750
* Returns: {TestsStream}
750751

751752
```mjs

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.