Skip to content

Commit 2b702c9

Browse files
richiemccolldanielleadams
authored andcommitted
doc: update test concurrency description / default values
PR-URL: #46457 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
1 parent f1de3f7 commit 2b702c9

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

doc/api/test.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,10 @@ added: v18.9.0
674674
properties are supported:
675675
* `concurrency` {number|boolean} If a number is provided,
676676
then that many files would run in parallel.
677-
If truthy, it would run (number of cpu cores - 1)
678-
files in parallel.
679-
If falsy, it would only run one file at a time.
680-
If unspecified, subtests inherit this value from their parent.
681-
**Default:** `true`.
677+
If `true`, it would run `os.availableParallelism() - 1` test files in
678+
parallel.
679+
If `false`, it would only run one test file at a time.
680+
**Default:** `false`.
682681
* `files`: {Array} An array containing the list of files to run.
683682
**Default** matching files from [test runner execution model][].
684683
* `setup` {Function} A function that accepts the `TestsStream` instance
@@ -721,10 +720,9 @@ changes:
721720
properties are supported:
722721
* `concurrency` {number|boolean} If a number is provided,
723722
then that many tests would run in parallel.
724-
If truthy, it would run (number of cpu cores - 1)
725-
tests in parallel.
723+
If `true`, it would run `os.availableParallelism() - 1` tests in parallel.
726724
For subtests, it will be `Infinity` tests in parallel.
727-
If falsy, it would only run one test at a time.
725+
If `false`, it would only run one test at a time.
728726
If unspecified, subtests inherit this value from their parent.
729727
**Default:** `false`.
730728
* `only` {boolean} If truthy, and the test context is configured to run
@@ -1592,9 +1590,12 @@ changes:
15921590
`fn` does not have a name.
15931591
* `options` {Object} Configuration options for the subtest. The following
15941592
properties are supported:
1595-
* `concurrency` {number} The number of tests that can be run at the same time.
1593+
* `concurrency` {number|boolean|null} If a number is provided,
1594+
then that many tests would run in parallel.
1595+
If `true`, it would run all subtests in parallel.
1596+
If `false`, it would only run one test at a time.
15961597
If unspecified, subtests inherit this value from their parent.
1597-
**Default:** `1`.
1598+
**Default:** `null`.
15981599
* `only` {boolean} If truthy, and the test context is configured to run
15991600
`only` tests, then this test will be run. Otherwise, the test is skipped.
16001601
**Default:** `false`.

0 commit comments

Comments
 (0)