Skip to content

Commit f23581b

Browse files
committed
doc: update test concurrency description / default value
1 parent 6d92cc7 commit f23581b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

doc/api/test.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,10 @@ added:
678678
properties are supported:
679679
* `concurrency` {number|boolean} If a number is provided,
680680
then that many files would run in parallel.
681-
If truthy, it would run (number of cpu cores - 1)
682-
files in parallel.
683-
If falsy, it would only run one file at a time.
681+
If `true`, it would run `os.availableParallelism() - 1` files in parallel.
682+
If `false`, it would only run one test at a time.
684683
If unspecified, subtests inherit this value from their parent.
685-
**Default:** `true`.
684+
**Default:** `false`.
686685
* `files`: {Array} An array containing the list of files to run.
687686
**Default** matching files from [test runner execution model][].
688687
* `signal` {AbortSignal} Allows aborting an in-progress test execution.
@@ -728,10 +727,9 @@ changes:
728727
properties are supported:
729728
* `concurrency` {number|boolean} If a number is provided,
730729
then that many tests would run in parallel.
731-
If truthy, it would run (number of cpu cores - 1)
732-
tests in parallel.
730+
If `true`, it would run `os.availableParallelism() - 1` files in parallel.
733731
For subtests, it will be `Infinity` tests in parallel.
734-
If falsy, it would only run one test at a time.
732+
If `false`, it would only run one test at a time.
735733
If unspecified, subtests inherit this value from their parent.
736734
**Default:** `false`.
737735
* `only` {boolean} If truthy, and the test context is configured to run
@@ -1645,9 +1643,12 @@ changes:
16451643
`fn` does not have a name.
16461644
* `options` {Object} Configuration options for the subtest. The following
16471645
properties are supported:
1648-
* `concurrency` {number} The number of tests that can be run at the same time.
1646+
* `concurrency` {number|boolean} If a number is provided,
1647+
then that many files would run in parallel.
1648+
If `true`, it would run `os.availableParallelism() - 1` files in parallel.
1649+
If `false`, it would only run one test at a time.
16491650
If unspecified, subtests inherit this value from their parent.
1650-
**Default:** `1`.
1651+
**Default:** `false`.
16511652
* `only` {boolean} If truthy, and the test context is configured to run
16521653
`only` tests, then this test will be run. Otherwise, the test is skipped.
16531654
**Default:** `false`.

0 commit comments

Comments
 (0)