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 a1403a8

Browse filesBrowse files
tniessentargos
authored andcommitted
doc: clarify concurrency model of test runner
Refs: #47365 PR-URL: #47642 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a793cf4 commit a1403a8
Copy full SHA for a1403a8

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/test.md‎

Copy file name to clipboardExpand all lines: doc/api/test.md
+9-3Lines changed: 9 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ Otherwise, the test is considered to be a failure. Test files must be
379379
executable by Node.js, but are not required to use the `node:test` module
380380
internally.
381381

382+
Each test file is executed as if it was a regular script. That is, if the test
383+
file itself uses `node:test` to define tests, all of those tests will be
384+
executed within a single application thread, regardless of the value of the
385+
`concurrency` option of [`test()`][].
386+
382387
## Collecting code coverage
383388

384389
> Stability: 1 - Experimental
@@ -735,7 +740,8 @@ changes:
735740
* `options` {Object} Configuration options for running tests. The following
736741
properties are supported:
737742
* `concurrency` {number|boolean} If a number is provided,
738-
then that many files would run in parallel.
743+
then that many test processes would run in parallel, where each process
744+
corresponds to one test file.
739745
If `true`, it would run `os.availableParallelism() - 1` test files in
740746
parallel.
741747
If `false`, it would only run one test file at a time.
@@ -805,7 +811,7 @@ changes:
805811
* `options` {Object} Configuration options for the test. The following
806812
properties are supported:
807813
* `concurrency` {number|boolean} If a number is provided,
808-
then that many tests would run in parallel.
814+
then that many tests would run in parallel within the application thread.
809815
If `true`, it would run `os.availableParallelism() - 1` tests in parallel.
810816
For subtests, it will be `Infinity` tests in parallel.
811817
If `false`, it would only run one test at a time.
@@ -1774,7 +1780,7 @@ changes:
17741780
* `options` {Object} Configuration options for the subtest. The following
17751781
properties are supported:
17761782
* `concurrency` {number|boolean|null} If a number is provided,
1777-
then that many tests would run in parallel.
1783+
then that many tests would run in parallel within the application thread.
17781784
If `true`, it would run all subtests in parallel.
17791785
If `false`, it would only run one test at a time.
17801786
If unspecified, subtests inherit this value from their parent.

0 commit comments

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