Skip to content

Commit d681e5f

Browse files
MoLowtargos
authored andcommitted
doc: document watch option for node:test run()
PR-URL: #48256 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 950185b commit d681e5f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

doc/api/test.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -744,25 +744,26 @@ changes:
744744
**Default:** `false`.
745745
* `files`: {Array} An array containing the list of files to run.
746746
**Default** matching files from [test runner execution model][].
747-
* `setup` {Function} A function that accepts the `TestsStream` instance
748-
and can be used to setup listeners before any tests are run.
749-
**Default:** `undefined`.
750-
* `signal` {AbortSignal} Allows aborting an in-progress test execution.
751-
* `timeout` {number} A number of milliseconds the test execution will
752-
fail after.
753-
If unspecified, subtests inherit this value from their parent.
754-
**Default:** `Infinity`.
755747
* `inspectPort` {number|Function} Sets inspector port of test child process.
756748
This can be a number, or a function that takes no arguments and returns a
757749
number. If a nullish value is provided, each process gets its own port,
758750
incremented from the primary's `process.debugPort`.
759751
**Default:** `undefined`.
752+
* `setup` {Function} A function that accepts the `TestsStream` instance
753+
and can be used to setup listeners before any tests are run.
754+
**Default:** `undefined`.
755+
* `signal` {AbortSignal} Allows aborting an in-progress test execution.
760756
* `testNamePatterns` {string|RegExp|Array} A String, RegExp or a RegExp Array,
761757
that can be used to only run tests whose name matches the provided pattern.
762758
Test name patterns are interpreted as JavaScript regular expressions.
763759
For each test that is executed, any corresponding test hooks, such as
764760
`beforeEach()`, are also run.
765761
**Default:** `undefined`.
762+
* `timeout` {number} A number of milliseconds the test execution will
763+
fail after.
764+
If unspecified, subtests inherit this value from their parent.
765+
**Default:** `Infinity`.
766+
* `watch` {boolean} Whether to run in watch mode or not. **Default:** `false`.
766767
* Returns: {TestsStream}
767768

768769
```mjs

0 commit comments

Comments
 (0)