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 4f541c3

Browse filesBrowse files
tniessenMoLow
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 7cef6aa commit 4f541c3
Copy full SHA for 4f541c3

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
@@ -373,6 +373,11 @@ Otherwise, the test is considered to be a failure. Test files must be
373373
executable by Node.js, but are not required to use the `node:test` module
374374
internally.
375375

376+
Each test file is executed as if it was a regular script. That is, if the test
377+
file itself uses `node:test` to define tests, all of those tests will be
378+
executed within a single application thread, regardless of the value of the
379+
`concurrency` option of [`test()`][].
380+
376381
## Collecting code coverage
377382

378383
When Node.js is started with the [`--experimental-test-coverage`][]
@@ -718,7 +723,8 @@ changes:
718723
* `options` {Object} Configuration options for running tests. The following
719724
properties are supported:
720725
* `concurrency` {number|boolean} If a number is provided,
721-
then that many files would run in parallel.
726+
then that many test processes would run in parallel, where each process
727+
corresponds to one test file.
722728
If `true`, it would run `os.availableParallelism() - 1` test files in
723729
parallel.
724730
If `false`, it would only run one test file at a time.
@@ -782,7 +788,7 @@ changes:
782788
* `options` {Object} Configuration options for the test. The following
783789
properties are supported:
784790
* `concurrency` {number|boolean} If a number is provided,
785-
then that many tests would run in parallel.
791+
then that many tests would run in parallel within the application thread.
786792
If `true`, it would run `os.availableParallelism() - 1` tests in parallel.
787793
For subtests, it will be `Infinity` tests in parallel.
788794
If `false`, it would only run one test at a time.
@@ -1683,7 +1689,7 @@ changes:
16831689
* `options` {Object} Configuration options for the subtest. The following
16841690
properties are supported:
16851691
* `concurrency` {number|boolean|null} If a number is provided,
1686-
then that many tests would run in parallel.
1692+
then that many tests would run in parallel within the application thread.
16871693
If `true`, it would run all subtests in parallel.
16881694
If `false`, it would only run one test at a time.
16891695
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.