node/doc/api
Tobias Nießen 1baf96aeb8
doc,test: fix concurrency option of test()
The documentation appears to still be wrong w.r.t. the meaning of the
concurrency option of the test() function. The implementation appears to
default to Infinity when the option is set to true. Is that intended or
a good idea? I don't know. It certainly makes more sense than what the
documentation says (which is basing the number of concurrent tasks
within a single thread on the number of CPU cores).

This changes the documentation to hopefully match the implementation and
adds a test that rules out the (rather arbitrary) behavior described in
the documentation.

Refs: https://github.com/nodejs/node/issues/47365
Refs: https://github.com/nodejs/node/pull/47642
PR-URL: https://github.com/nodejs/node/pull/47734
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-04-28 18:32:08 +00:00
..
addons.md doc: use "file system" instead of "filesystem" 2023-01-14 01:10:38 +00:00
assert.md doc: revise example of assert.CallTracker 2023-03-29 18:17:18 +00:00
async_context.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
async_hooks.md doc: async_hooks asynchronous content example add mjs code 2023-04-26 06:18:42 +00:00
buffer.md doc: update error code of buffer 2023-04-21 10:05:08 +00:00
child_process.md doc: abort controller emits error in child process 2023-01-07 08:01:47 +00:00
cli.md test_runner: support combining coverage reports 2023-04-28 13:13:53 +00:00
cluster.md doc: use os.availableParallelism() in async_context and cluster 2022-12-28 11:45:10 +00:00
console.md doc: use serial comma in console docs 2022-05-31 14:57:50 +01:00
corepack.md doc: mention corepack prepare supports tag or range 2022-10-10 02:47:39 +02:00
crypto.md crypto: remove DEFAULT_ENCODING 2023-03-26 18:03:58 +00:00
debugger.md debugger: improve validations and documents for watch and unwatch 2023-03-13 04:29:53 +00:00
deprecations.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
dgram.md 2022-12-13, Version 16.19.0 'Gallium' (LTS) 2022-12-13 08:01:09 -05:00
diagnostics_channel.md doc: fix typos 2023-04-23 13:34:08 +00:00
dns.md dns: expose getDefaultResultOrder 2023-04-26 08:56:04 +00:00
documentation.md doc: add experimental stages 2023-01-14 14:25:08 +00:00
domain.md doc: fix typos 2023-04-23 13:34:08 +00:00
embedding.md src: add detailed embedder process initialization API 2022-08-05 19:46:08 +00:00
errors.md net: enable autoSelectFamily by default 2023-04-05 08:31:56 -07:00
esm.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
events.md 2023-04-12, Version 18.16.0 'Hydrogen' (LTS) 2023-04-12 20:34:40 -04:00
fs.md doc: fix a typo in fs.openAsBlob 2023-04-24 07:36:53 +00:00
globals.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
http2.md doc: fix port of destination server is not defined in http2 2023-03-06 00:29:27 +00:00
http.md http: add highWaterMark opt in http.createServer 2023-04-24 05:35:38 +00:00
https.md doc: https update default request timeout 2023-01-13 08:32:19 +00:00
index.md src: add initial support for single executable applications 2023-02-18 02:49:18 +00:00
inspector.md doc: fix typos 2023-04-23 13:34:08 +00:00
intl.md doc: fix icu-small example 2022-06-30 09:34:10 -04:00
module.md lib: codify findSourceMap return value when not found 2022-08-27 23:13:53 +00:00
modules.md doc: use "file system" instead of "filesystem" 2023-01-14 01:10:38 +00:00
n-api.md doc: fix typos 2023-04-23 13:34:08 +00:00
net.md http: add highWaterMark opt in http.createServer 2023-04-24 05:35:38 +00:00
os.md doc: add a note about os.cpus() returning an empty list 2023-04-04 12:29:52 -07:00
packages.md doc: fix typos in packages.md 2022-12-24 21:04:19 +01:00
path.md doc: add lint rule to enforce trailing commas 2022-11-17 13:19:12 +00:00
perf_hooks.md doc: indicate that name is no longer an optional argument 2023-03-17 12:48:53 +00:00
permissions.md doc: fix a typo in permissions.md 2023-04-26 18:34:52 +00:00
policy.md doc: move policy docs to the permissions scope 2022-09-05 16:07:45 +00:00
process.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
punycode.md doc: format doc/api/*.md with markdown formatter 2021-10-20 11:59:11 +02:00
querystring.md doc: remove Legacy status from querystring 2022-10-09 15:22:50 +00:00
readline.md doc: add lint rule to enforce trailing commas 2022-11-17 13:19:12 +00:00
repl.md doc: update error message of example in repl 2022-12-24 20:09:54 +00:00
report.md doc: use "file system" instead of "filesystem" 2023-01-14 01:10:38 +00:00
single-executable-applications.md doc: mark signing the binary is macOS and Windows only in SEA 2023-04-28 09:02:55 +00:00
stream.md 2023-04-12, Version 18.16.0 'Hydrogen' (LTS) 2023-04-12 20:34:40 -04:00
string_decoder.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
synopsis.md doc: use ASCII apostrophes consistently 2022-05-17 20:04:51 +01:00
test.md doc,test: fix concurrency option of test() 2023-04-28 18:32:08 +00:00
timers.md doc: use console.error for error case in timers and tls 2023-01-01 06:41:28 +00:00
tls.md tls: accept SecureContext object in server.addContext() 2023-04-26 06:39:00 +00:00
tracing.md src: trace threadpool event 2022-11-01 04:21:13 +00:00
tty.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
url.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
util.md doc: fix typos 2023-04-23 13:34:08 +00:00
v8.md 2023-03-07, Version 18.15.0 'Hydrogen' (LTS) 2023-03-07 14:52:01 -05:00
vm.md doc: vm.SourceTextModule() without context option 2023-03-31 12:24:30 +00:00
wasi.md doc: fix typos 2023-04-23 13:34:08 +00:00
webcrypto.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
webstreams.md doc: remove unused functions from example of streamConsumers.text 2023-02-13 03:46:03 +00:00
worker_threads.md doc: fix typos 2023-04-23 13:34:08 +00:00
zlib.md doc: add lint rule to enforce trailing commas 2022-11-17 13:19:12 +00:00