Commit Graph
256 Commits
Author SHA1 Message Date
Christopher Hiller cd78d08026 doc: formalize fn/name as part of TestOptions API
`TestOptions` as provided to `node:test`'s `test`/`it` supports both
`name` and `fn` as options per its implementation.

I'd like to formalize this as part of the public, documented API.

### Motivation

I have a use-case for consuming both fields.  I'd like to be able to
return the result of a function to `test`/`it` without needing to spread
 the parameters; e.g.:

```js
const testOptionsFactory = (opts = {}) => {
  return {
    fn: () => { /* .. */ },
    name: opts.name
  };
};

test(testOptionsFactory({name: 'foo'}));
```

If I cannot rely on this behavior, then I would need to instead return
an array of parameters and spread them:

```js
const testParamsFactory = (opts = {}) => {
  return opts.name !== undefined
    ? [opts.name, () => { /* .. */ }] : [() => { /* .. */ }];
};

test(...testParamsFactory({name: 'foo'}));
```

I don't think it's too terribly controversial that the former is more
ergonomic than the latter.

### Next Steps

Once this lands, I plan to propose the addition of these fields to
`@types/node`. Since the fields are not currently publicly documented, I
can't justify such a change.

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
PR-URL: https://github.com/nodejs/node/pull/64946
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-08-04 01:45:07 +00:00
Antoine du Hamel a24bd2769f 2026-08-03, Version 26.6.0 (Current)
Notable changes:

doc:
  * add MikeMcC399 as collaborator (Mike McCready) https://github.com/nodejs/node/pull/64656
ffi:
  * (SEMVER-MINOR) add `getCurrentEventLoop` (Paolo Insogna) https://github.com/nodejs/node/pull/64323
test_runner:
  * (SEMVER-MINOR) add `context.log()` and `test:log` event (Moshe Atlow) https://github.com/nodejs/node/pull/64389
  * (SEMVER-MINOR) report `entryFile` in `TestStream` events (Moshe Atlow) https://github.com/nodejs/node/pull/64309

PR-URL: https://github.com/nodejs/node/pull/64655
2026-08-03 15:30:47 +02:00
Antoine du Hamel 401ea64c3e 2026-08-03, Version 24.19.0 'Krypton' (LTS)
Notable changes:

buffer:
  * (SEMVER-MINOR) implement `blob.textStream()` (Matthew Aitken) https://github.com/nodejs/node/pull/64036
deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) https://github.com/nodejs/node/pull/62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) https://github.com/nodejs/node/pull/63050
  * mark `stream.compose` stable (Matteo Collina) https://github.com/nodejs/node/pull/62562
esm:
  * (SEMVER-MINOR) add `--experimental-import-text` flag (Efe) https://github.com/nodejs/node/pull/62300
fs:
  * (SEMVER-MINOR) support caller-supplied `readFile()` buffers (Matteo Collina) https://github.com/nodejs/node/pull/63634
http:
  * (SEMVER-MINOR) add `httpValidation` option to configure header value validation (RajeshKumar11) https://github.com/nodejs/node/pull/61597
net:
  * (SEMVER-MINOR) support `TCP_KEEPINTVL` and `TCP_KEEPCNT` in `setKeepAlive` (Guy Bedford) https://github.com/nodejs/node/pull/63825
perf_hooks:
  * (SEMVER-MINOR) sample delay per event loop iteration (Pablo Erhard) https://github.com/nodejs/node/pull/62935
src:
  * (SEMVER-MINOR) allow empty `--experimental-config-file` (Marco Ippolito) https://github.com/nodejs/node/pull/61610
stream:
  * (SEMVER-MINOR) expose `ReadableStreamTee` (Matteo Collina) https://github.com/nodejs/node/pull/64195
tls:
  * (SEMVER-MINOR) report negotiated TLS groups (Filip Skokan) https://github.com/nodejs/node/pull/64119
  * (SEMVER-MINOR) add `certificateCompression` option (Tim Perry) https://github.com/nodejs/node/pull/62217

PR-URL: https://github.com/nodejs/node/pull/64654
2026-08-03 15:30:35 +02:00
Kamal Rawal 7e439828de doc: improve TestContext hook descriptions
Signed-off-by: Rawal27 <obviouslykamal@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64899
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-08-03 05:35:11 +00:00
Kamal Rawal 53ea5a1444 doc: fix duplicated word in test snapshot docs
Signed-off-by: Rawal27 <obviouslykamal@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64837
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-01 07:56:55 +00:00
avivkeller b7d29fee74 test_runner: add support for --test-coverage-include-all
Signed-off-by: avivkeller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/64830
Fixes: https://github.com/nodejs/node/issues/58887
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-07-31 15:58:10 -07:00
Antoine du Hamel 2deb0a1b0f doc: fix broken links and clean up type map
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64625
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-22 13:18:57 +00:00
Moshe Atlow 892976d17a test_runner: add context.log() and test:log event
Add a log(message[, data]) method to TestContext and SuiteContext that
emits a new test:log event. Unlike test:diagnostic, which is buffered
so it is emitted in the order tests are defined, test:log is emitted
immediately, in the order tests execute, including under process
isolation where it bypasses the per-file declaration order buffer.
This gives reporters that render the test tree unbuffered a live,
attributed logging channel that captured stdout cannot provide under
concurrency.

The event carries the message, an optional opaque structured payload
that the runner passes through untouched, and the emitting test's
name, testId, parentId, nesting, and location. Built-in reporters
render it the same way they render test:diagnostic.

Signed-off-by: Moses Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/64389
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-07-12 11:45:05 +00:00
Moshe Atlow 8f5fda2d23 doc: add scope overview tables for TestsStream events
Summarize all TestsStream events in three tables by scope (test, file,
and global), pairing declaration ordered (buffered) test scoped events
with their execution ordered (immediate) equivalents.

Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/64386
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-07-11 08:11:37 +00:00
Moshe Atlow f4c85d5d82 test_runner: report entryFile in TestStream events
Signed-off-by: Moshe Atlov <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/64309
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-07-07 15:29:21 +00:00
Kimaswa Emmanuel Yusufu ef42d32d56 doc: fix incorrect test runner mock examples
The CJS mock.timers.setTime example asserted the timer ran right after
setTime() with no tick() call, which contradicts the documented behavior
and the ESM example above it. The mock.module example called .fn() on an
export named foo. Both threw if run.

Signed-off-by: Emmanuel Yusufu Kimaswa <kimaswaemma36@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63656
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-06-17 09:11:36 +00:00
Antoine du Hamel 6d02b36f30 2026-06-01, Version 26.3.0 (Current)
Notable changes:

buffer:
  * (SEMVER-MINOR) increase `Buffer.poolSize` default to 64 KiB (Matteo Collina) https://github.com/nodejs/node/pull/63597
crypto:
  * update root certificates to NSS 3.123.1 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/63527
doc:
  * downgrade macOS x64 support to Tier 2 (Antoine du Hamel) https://github.com/nodejs/node/pull/63055
http:
  * (SEMVER-MINOR) add `httpValidation` option to configure header value validation (RajeshKumar11) https://github.com/nodejs/node/pull/61597
inspector:
  * (SEMVER-MINOR) expose precise coverage start to JS runtime (sangwook) https://github.com/nodejs/node/pull/63079
lib,permission:
  * (SEMVER-MINOR) add `permission.drop` (Rafael Gonzaga) https://github.com/nodejs/node/pull/62672

PR-URL: https://github.com/nodejs/node/pull/63664
2026-06-01 15:01:03 +02:00
Moshe Atlow e6e670015c test_runner: add parentId to test events with testId
Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63435
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-05-21 16:06:26 +00:00
Node.js GitHub Bot 0d6541aca0 2026-05-21, Version 24.16.0 'Krypton' (LTS)
Notable changes:

crypto:
  * (SEMVER-MINOR) implement `randomUUIDv7()` (nabeel378) https://github.com/nodejs/node/pull/62553
debugger:
  * (SEMVER-MINOR) add edit-free runtime expression probes to `node inspect` (Joyee Cheung) https://github.com/nodejs/node/pull/62713
fs:
  * (SEMVER-MINOR) add `signal` option to `fs.stat()` (Mert Can Altin) https://github.com/nodejs/node/pull/57775
  * (SEMVER-MINOR) expose `frsize` field in `statfs` (Jinho Jang) https://github.com/nodejs/node/pull/62277
http:
  * (SEMVER-MINOR) harden `ClientRequest` options merge (Matteo Collina) https://github.com/nodejs/node/pull/63082
  * (SEMVER-MINOR) add `req.signal` to `IncomingMessage` (Akshat) https://github.com/nodejs/node/pull/62541
stream:
  * (SEMVER-MINOR) propagate destruction in `duplexPair` (Ahmed Elhor) https://github.com/nodejs/node/pull/61098
test_runner:
  * (SEMVER-MINOR) support test order randomization (Pietro Marchini) https://github.com/nodejs/node/pull/61747
  * (SEMVER-MINOR) align mock timeout api (sangwook) https://github.com/nodejs/node/pull/62820
  * (SEMVER-MINOR) add mock-timers support for `AbortSignal.timeout` (DeveloperViraj) https://github.com/nodejs/node/pull/60751
util:
  * (SEMVER-MINOR) colorize text with hex colors (Guilherme Araújo) https://github.com/nodejs/node/pull/61556

PR-URL: https://github.com/nodejs/node/pull/63263
2026-05-21 15:17:18 +02:00
Antoine du Hamel d9558968d9 2026-05-20, Version 26.2.0 (Current)
Notable changes:

doc:
  * mark `stream.compose` stable (Matteo Collina) https://github.com/nodejs/node/pull/62562
fs:
  * (SEMVER-MINOR) add `Temporal.Instant` support to `Stats` and `BigIntStats` (Livia Medeiros) https://github.com/nodejs/node/pull/60789
http:
  * (SEMVER-MINOR) add `writeInformation` to send arbitrary 1xx status codes (Tim Perry) https://github.com/nodejs/node/pull/63155

PR-URL: https://github.com/nodejs/node/pull/63440
2026-05-20 15:00:12 +02:00
Chemi Atlow b06aee06d3 test_runner: add tags option and tag-name filter
Adds a `tags` option to test(), it(), suite(), and describe() that
accepts an array of string labels. Tags are canonicalized to lowercase
and inherited from suites to nested tests by union. Reporter events
expose the tag set on every test, and TestContext exposes the test's
tags via `context.tags`.

Filtering is done by literal tag name through the new
`--experimental-test-tag-filter=<tag>` flag (or `testTagFilters` on
run()). The flag may be specified more than once; tests must contain
every filter to run. Untagged tests are excluded under any positive
filter.

The tagging mechanism is gated behind a one-shot ExperimentalWarning.

Signed-off-by: atlowChemi <chemi@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63221
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-05-12 06:51:19 +00:00
Antoine du Hamel ccab9ac506 doc: fix inconsistencies in CJS code snippets
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63199
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-05-10 14:16:15 +00:00
Antoine du Hamel a725fe1389 2026-05-07, Version 26.1.0 (Current)
Notable changes:

buffer:
  * (SEMVER-MINOR) add `end` parameter (Robert Nagy) https://github.com/nodejs/node/pull/62390
crypto:
  * (SEMVER-MINOR) accept key data in `crypto.diffieHellman()` and cleanup DH jobs (Filip Skokan) https://github.com/nodejs/node/pull/62527
  * (SEMVER-MINOR) implement `randomUUIDv7()` (nabeel378) https://github.com/nodejs/node/pull/62553
debugger:
  * (SEMVER-MINOR) add edit-free runtime expression probes to `node inspect` (Joyee Cheung) https://github.com/nodejs/node/pull/62713
fs:
  * (SEMVER-MINOR) add `signal` option to `fs.stat()` (Mert Can Altin) https://github.com/nodejs/node/pull/57775
  * (SEMVER-MINOR) expose frsize field in statfs (Jinho Jang) https://github.com/nodejs/node/pull/62277
http:
  * (SEMVER-MINOR) harden `ClientRequest` options merge (Matteo Collina) https://github.com/nodejs/node/pull/63082
  * (SEMVER-MINOR) add `req.signal` to `IncomingMessage` (Akshat) https://github.com/nodejs/node/pull/62541
lib,src,test,doc:
  * (SEMVER-MINOR) add `node:ffi` module (Colin Ihrig) https://github.com/nodejs/node/pull/62072
process:
  * (SEMVER-MINOR) throw on `execve(2)` failure instead of aborting (Bryan English) https://github.com/nodejs/node/pull/62878
src:
  * (SEMVER-MINOR) allow empty `--experimental-config-file` (Marco Ippolito) https://github.com/nodejs/node/pull/61610
stream:
  * (SEMVER-MINOR) propagate destruction in `duplexPair` (Ahmed Elhor) https://github.com/nodejs/node/pull/61098
test_runner:
  * (SEMVER-MINOR) align mock timeout api (sangwook) https://github.com/nodejs/node/pull/62820
  * (SEMVER-MINOR) add mock-timers support for `AbortSignal.timeout` (DeveloperViraj) https://github.com/nodejs/node/pull/60751
  * (SEMVER-MINOR) support test order randomization (Pietro Marchini) https://github.com/nodejs/node/pull/61747
util:
  * (SEMVER-MINOR) colorize text with hex colors (Guilherme Araújo) https://github.com/nodejs/node/pull/61556

PR-URL: https://github.com/nodejs/node/pull/63137
2026-05-07 12:01:50 +02:00
Rich Trott e6ca1fa6b6 doc: fix typo in test.md
Signed-off-by: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62960
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-04-27 23:14:32 +00:00
Moshe Atlow 31b9e60979 test_runner: add testId to test events
Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/62772
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-04-18 10:10:56 +00:00
Marco Ippolito 2071c44630 src: allow empty --experimental-config-file
PR-URL: https://github.com/nodejs/node/pull/61610
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-04-16 06:31:35 +00:00
Node.js GitHub Bot 0dceddde2c 2026-04-15, Version 24.15.0 'Krypton' (LTS)
Notable changes:

cli:
  * (SEMVER-MINOR) add --max-heap-size option (tannal) https://github.com/nodejs/node/pull/58708
  * add --require-module/--no-require-module (Joyee Cheung) https://github.com/nodejs/node/pull/60959
crypto:
  * (SEMVER-MINOR) add raw key formats support to the KeyObject APIs (Filip Skokan) https://github.com/nodejs/node/pull/62240
fs:
  * (SEMVER-MINOR) add `throwIfNoEntry` option for fs.stat and fs.promises.stat (Juan José) https://github.com/nodejs/node/pull/61178
http2:
  * (SEMVER-MINOR) add http1Options for HTTP/1 fallback configuration (Amol Yadav) https://github.com/nodejs/node/pull/61713
module:
  * mark require(esm) as stable (Joyee Cheung) https://github.com/nodejs/node/pull/60959
  * mark module compile cache as stable (Joyee Cheung) https://github.com/nodejs/node/pull/60971
net:
  * (SEMVER-MINOR) add `setTOS` and `getTOS` to `Socket` (Amol Yadav) https://github.com/nodejs/node/pull/61503
sqlite:
  * (SEMVER-MINOR) add limits property to DatabaseSync (Mert Can Altin) https://github.com/nodejs/node/pull/61298
  * mark as release candidate (Matteo Collina) https://github.com/nodejs/node/pull/61262
src:
  * (SEMVER-MINOR) add C++ support for diagnostics channels (RafaelGSS) https://github.com/nodejs/node/pull/61869
stream:
  * (SEMVER-MINOR) rename `Duplex.toWeb()` type option to `readableType` (René) https://github.com/nodejs/node/pull/61632
test_runner:
  * add exports option for module mocks (sangwook) https://github.com/nodejs/node/pull/61727
  * (SEMVER-MINOR) expose worker ID for concurrent test execution (Ali Hassan) https://github.com/nodejs/node/pull/61394
  * (SEMVER-MINOR) show interrupted test on SIGINT (Matteo Collina) https://github.com/nodejs/node/pull/61676

PR-URL: https://github.com/nodejs/node/pull/62681
2026-04-15 18:59:05 +02:00
Moshe Atlow c7d05fc0d3 test_runner: publish to TracingChannel for OTel instrumentation
Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/62502
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-04-13 15:01:34 +03:00
Pietro Marchini 5ff1eab951 test_runner: support test order randomization
PR-URL: https://github.com/nodejs/node/pull/61747
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-04-02 16:55:11 +00:00
Moshe Atlow e0d2e1c148 doc: mention test runner retry attemp is zero based
PR-URL: https://github.com/nodejs/node/pull/62504
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2026-04-01 11:29:56 +00:00
Moshe Atlow cdc577484b test_runner: add passed, attempt, and diagnostic to SuiteContext
PR-URL: https://github.com/nodejs/node/pull/62504
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2026-04-01 11:29:56 +00:00
Moshe Atlow c5a83ab77c test_runner: add getTestContext()
PR-URL: https://github.com/nodejs/node/pull/62501
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-04-01 10:09:41 +00:00
sangwook 7d1f1b4483 test_runner: add exports option for module mocks
Add options.exports support in mock.module() and normalize option

shapes through a shared exports path.

Keep defaultExport and namedExports as aliases, emit runtime

deprecation warnings for legacy options, and update docs and tests,

including output fixtures and coverage snapshots.

Refs: https://github.com/nodejs/node/issues/58443
PR-URL: https://github.com/nodejs/node/pull/61727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-03-27 15:52:13 +00:00
Jacob Smith e57d5bbb2a doc: add note (and caveat) for mock.module about customization hooks
PR-URL: https://github.com/nodejs/node/pull/62075
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2026-03-11 20:20:16 +00:00
Jacob Smith 23ba2054f3 doc: fix markdown for expectFailure values
PR-URL: https://github.com/nodejs/node/pull/62100
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-03-04 14:26:01 +00:00
Node.js GitHub Bot 3b9fe896c3 2026-03-03, Version 25.8.0 (Current)
Notable changes:

build, doc:
  * use new api doc tooling (flakey5) https://github.com/nodejs/node/pull/57343
sqlite:
  * (SEMVER-MINOR) add limits property to DatabaseSync (Mert Can Altin) https://github.com/nodejs/node/pull/61298
src:
  * (SEMVER-MINOR) add C++ support for diagnostics channels (RafaelGSS) https://github.com/nodejs/node/pull/61869
src,permission:
  * (SEMVER-MINOR) add --permission-audit (RafaelGSS) https://github.com/nodejs/node/pull/61869
test_runner:
  * (SEMVER-MINOR) expose worker ID for concurrent test execution (Ali Hassan) https://github.com/nodejs/node/pull/61394

PR-URL: https://github.com/nodejs/node/pull/62073
2026-03-03 15:50:38 +00:00
sangwook 2e1265a444 test_runner: expose expectFailure message
This change exposes the expectFailure message in the test runner and
adds edge cases for expectFailure ambiguity.

PR-URL: https://github.com/nodejs/node/pull/61563
Fixes: https://github.com/nodejs/node/issues/61570
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-02-26 15:37:55 +00:00
Ali Hassan 2ebe49600e test_runner: expose worker ID for concurrent test execution
This adds support for identifying which worker is running a test file
when tests execute concurrently, similar to JEST_WORKER_ID in Jest,
VITEST_POOL_ID in Vitest, and MOCHA_WORKER_ID in Mocha.

When running with --test-isolation=process (default), each test file
runs in a separate child process and receives a unique worker ID from
1 to N. When running with --test-isolation=none, all tests run in the
same process and the worker ID is always 1.

This enables users to allocate separate resources (databases, ports,
etc.) for each test worker to avoid conflicts during concurrent
execution.

Changes:
- Add WorkerIdPool class to manage worker ID allocation and reuse
- Set NODE_TEST_WORKER_ID environment variable for child processes
- Add context.workerId getter to TestContext class
- Add tests for worker ID functionality
- Add documentation for context.workerId

Fixes: https://github.com/nodejs/node/issues/55842
PR-URL: https://github.com/nodejs/node/pull/61394
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-02-24 23:37:22 +00:00
Antoine du Hamel 7427866935 2026-02-24, Version 25.7.0 (Current)
Notable changes:

http2:
  * (SEMVER-MINOR) add http1Options for HTTP/1 fallback configuration (Amol Yadav) https://github.com/nodejs/node/pull/61713
sea:
  * (SEMVER-MINOR) support ESM entry point in SEA (Joyee Cheung) https://github.com/nodejs/node/pull/61813
sqlite:
  * mark as release candidate (Matteo Collina) https://github.com/nodejs/node/pull/61262
stream:
  * (SEMVER-MINOR) rename `Duplex.toWeb()` type option to `readableType` (René) https://github.com/nodejs/node/pull/61632
test_runner:
  * (SEMVER-MINOR) show interrupted test on SIGINT (Matteo Collina) https://github.com/nodejs/node/pull/61676

PR-URL: https://github.com/nodejs/node/pull/61922
2026-02-24 10:24:26 -05:00
Antoine du Hamel 001d5d4b77 2026-02-24, Version 24.14.0 'Krypton' (LTS)
Notable changes:

async_hooks:
  * (SEMVER-MINOR) add `trackPromises` option to `createHook()` (Joyee Cheung) https://github.com/nodejs/node/pull/61415
build,deps:
  * replace cjs-module-lexer with merve (Yagiz Nizipli) https://github.com/nodejs/node/pull/61456
deps:
  * (SEMVER-MINOR) add LIEF as a dependency (Joyee Cheung) https://github.com/nodejs/node/pull/61167
events:
  * (SEMVER-MINOR) repurpose `events.listenerCount()` to accept `EventTarget`s (René) https://github.com/nodejs/node/pull/60214
fs:
  * (SEMVER-MINOR) add `ignore` option to `fs.watch` (Matteo Collina) https://github.com/nodejs/node/pull/61433
http:
  * (SEMVER-MINOR) add `http.setGlobalProxyFromEnv()` (Joyee Cheung) https://github.com/nodejs/node/pull/60953
module:
  * (SEMVER-MINOR) allow subpath imports that start with `#/` (Jan Martin) https://github.com/nodejs/node/pull/60864
process:
  * (SEMVER-MINOR) preserve `AsyncLocalStorage` in `queueMicrotask` only when needed (Gürgün Dayıoğlu) https://github.com/nodejs/node/pull/60913
sea:
  * (SEMVER-MINOR) split sea binary manipulation code (Joyee Cheung) https://github.com/nodejs/node/pull/61167
sqlite:
  * (SEMVER-MINOR) enable defensive mode by default (Bart Louwers) https://github.com/nodejs/node/pull/61266
  * (SEMVER-MINOR) add sqlite prepare options args (Guilherme Araújo) https://github.com/nodejs/node/pull/61311
src:
  * (SEMVER-MINOR) add initial support for ESM in embedder API (Joyee Cheung) https://github.com/nodejs/node/pull/61548
stream:
  * (SEMVER-MINOR) add `bytes()` method to `node:stream/consumers` (wantaek) https://github.com/nodejs/node/pull/60426
  * (SEMVER-MINOR) do not pass `readable.compose()` output via `Readable.from()` (René) https://github.com/nodejs/node/pull/60907
test:
  * (SEMVER-MINOR) use fixture directories for sea tests (Joyee Cheung) https://github.com/nodejs/node/pull/61167
test_runner:
  * (SEMVER-MINOR) add `env` option to `run` function (Ethan Arrowood) https://github.com/nodejs/node/pull/61367
  * (SEMVER-MINOR) support expecting a test-case to fail (Jacob Smith) https://github.com/nodejs/node/pull/60669
util:
  * (SEMVER-MINOR) add `convertProcessSignalToExitCode` utility (Erick Wendel) https://github.com/nodejs/node/pull/60963

PR-URL: https://github.com/nodejs/node/pull/61924
2026-02-24 10:20:06 -05:00
Matteo Collina 7215ea428c test_runner: show interrupted test on SIGINT
When the test runner process is killed with SIGINT (Ctrl+C), display
which test was running at the time of interruption. This makes it
easier to identify tests that hang or take too long.

- Add `test:interrupted` event emitted when SIGINT is received
- Add `interrupted()` method to TestsStream
- Handle the event in both TAP and spec reporters
- TAP outputs: `# Interrupted while running: <test>`
- Spec outputs with yellow header and warning symbol
- Use setImmediate to allow reporter stream to flush before exit

With process isolation (default), shows the file path since the
parent runner only knows about file-level tests.
With --test-isolation=none, shows the actual test name.

PR-URL: https://github.com/nodejs/node/pull/61676
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-02-14 16:29:52 +00:00
Luca Raveri 5dfb1a2e31 doc: move describe/it aliases section before expectFailure
PR-URL: https://github.com/nodejs/node/pull/61567
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2026-02-09 20:26:12 +00:00
Steven 88760f9e8b doc: mention default option for test runner env
PR-URL: https://github.com/nodejs/node/pull/61659
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-02-07 20:50:17 +00:00
Antoine du Hamel 1818bb7e81 2026-02-03, Version 25.6.0 (Current)
Notable changes:

async_hooks:
  * (SEMVER-MINOR) add `trackPromises` option to `createHook()` (Joyee Cheung) https://github.com/nodejs/node/pull/61415
net:
  * (SEMVER-MINOR) add `setTOS` and `getTOS` to `Socket` (Amol Yadav) https://github.com/nodejs/node/pull/61503
src:
  * (SEMVER-MINOR) add initial support for ESM in embedder API (Joyee Cheung) https://github.com/nodejs/node/pull/61548
  * improve `TextEncoder` encode performance with `simdutf` (Mert Can Altin) https://github.com/nodejs/node/pull/61496
stream:
  * (SEMVER-MINOR) add `bytes()` method to `node:stream/consumers` (wantaek) https://github.com/nodejs/node/pull/60426
test_runner:
  * (SEMVER-MINOR) add `env` option to `run` function (Ethan Arrowood) https://github.com/nodejs/node/pull/61367
url:
  * update Ada to v3.4.2 and support Unicode 17 (Yagiz Nizipli) https://github.com/nodejs/node/pull/61593

PR-URL: https://github.com/nodejs/node/pull/61635
2026-02-03 12:37:44 +01:00
Ethan Arrowood ec15c3b7b1 test_runner: add env option to run function
Support an `env` option that is passed to the underlying child_process.

Fixes: https://github.com/nodejs/node/issues/60709
PR-URL: https://github.com/nodejs/node/pull/61367
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-01-29 08:18:11 +00:00
Antoine du Hamel 6beb65e00e 2026-01-26, Version 25.5.0 (Current)
Notable changes:

crypto:
  * update root certificates to NSS 3.119 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/61419
deps:
  * (SEMVER-MINOR) add LIEF as a dependency (Joyee Cheung) https://github.com/nodejs/node/pull/61167
  * (SEMVER-MINOR) add tools and scripts to pull LIEF as a dependency (Joyee Cheung) https://github.com/nodejs/node/pull/61167
fs:
  * (SEMVER-MINOR) add ignore option to fs.watch (Matteo Collina) https://github.com/nodejs/node/pull/61433
sea:
  * (SEMVER-MINOR) add `--build-sea` to generate SEA directly with Node.js binary (Joyee Cheung) https://github.com/nodejs/node/pull/61167
  * (SEMVER-MINOR) split sea binary manipulation code (Joyee Cheung) https://github.com/nodejs/node/pull/61167
sqlite:
  * (SEMVER-MINOR) enable defensive mode by default (Bart Louwers) https://github.com/nodejs/node/pull/61266
  * (SEMVER-MINOR) add sqlite prepare options args (Guilherme Araújo) https://github.com/nodejs/node/pull/61311
src:
  * use node- prefix on thread names (Stewart X Addison) https://github.com/nodejs/node/pull/61307
test:
  * (SEMVER-MINOR) migrate to `--build-sea` in existing SEA tests (Joyee Cheung) https://github.com/nodejs/node/pull/61167
  * (SEMVER-MINOR) use fixture directories for sea tests (Joyee Cheung) https://github.com/nodejs/node/pull/61167
test_runner:
  * (SEMVER-MINOR) support expecting a test-case to fail (Jacob Smith) https://github.com/nodejs/node/pull/60669

PR-URL: https://github.com/nodejs/node/pull/61519
2026-01-26 21:30:03 +01:00
Jacob SmithandAlejandro Espa 538aebfa5d test_runner: support expecting a test-case to fail
Co-Authored-By: Alejandro Espa <98526766+vespa7@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/60669
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-01-15 22:55:01 +01:00
Xavier StouderandSimonSchick 20bf3287c2 doc: missing passed, error and passed properties on TestContext
`passed` and `error` properties were left undocumented on `TextContext`
class

Fixes: https://github.com/nodejs/node/issues/59321
Refs: https://github.com/nodejs/node/pull/51485
Refs: https://github.com/nodejs/node/pull/59322

Co-authored-by: SimonSchick <demwizzy@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61185
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-12-30 07:19:05 +00:00
Efe 038cb75012 doc: fix test settime docs
PR-URL: https://github.com/nodejs/node/pull/61117
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2025-12-20 18:11:05 +00:00
Antoine du Hamel 79df8b209b lib,test: enforce use of assert.fail via a lint rule
PR-URL: https://github.com/nodejs/node/pull/61004
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2025-12-11 15:23:33 +01:00
PaulyBearCoding 90980932a4 doc: add fullName property to SuiteContext
Add documentation for the missing fullName property in SuiteContext.
This property returns the name of the suite and each of its ancestors,
separated by '>'.

The property has been available since v22.3.0 but was missing from the
documentation.

Fixes: https://github.com/nodejs/node/issues/60757
PR-URL: https://github.com/nodejs/node/pull/60762
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-25 19:34:19 +00:00
Azad Gupta 774e5647be doc: correct concurrency wording in test() documentation
PR-URL: https://github.com/nodejs/node/pull/60773
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2025-11-20 10:52:50 +00:00
Marco Ippolito 8e5c80d108 module: mark type stripping as stable
PR-URL: https://github.com/nodejs/node/pull/60600
Refs: https://github.com/nodejs/typescript/issues/24
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2025-11-08 09:36:45 +00:00
Node.js GitHub Bot f5e2ecc41b 2025-09-24, Version 22.20.0 'Jod' (LTS)
Notable changes:

crypto:
  * update root certificates to NSS 3.114 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59571
deps:
  * fix OpenSSL security level at 1 (Richard Lau) https://github.com/nodejs/node/pull/59859
  * upgrade openssl sources to openssl-3.5.2 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59371
doc:
  * stabilize --disable-sigusr1 (Rafael Gonzaga) https://github.com/nodejs/node/pull/59707
  * mark `path.matchesGlob` as stable (Aviv Keller) https://github.com/nodejs/node/pull/59572
http:
  * (SEMVER-MINOR) add Agent.agentKeepAliveTimeoutBuffer option (Haram Jeong) https://github.com/nodejs/node/pull/59315
http2:
  * (SEMVER-MINOR) add support for raw header arrays in h2Stream.respond() (Tim Perry) https://github.com/nodejs/node/pull/59455
inspector:
  * add http2 tracking support (Darshan Sen) https://github.com/nodejs/node/pull/59611
sea:
  * (SEMVER-MINOR) implement execArgvExtension (Joyee Cheung) https://github.com/nodejs/node/pull/59560
  * (SEMVER-MINOR) support execArgv in sea config (Joyee Cheung) https://github.com/nodejs/node/pull/59314
stream:
  * (SEMVER-MINOR) add brotli support to CompressionStream and DecompressionStream (Matthew Aitken) https://github.com/nodejs/node/pull/59464
test_runner:
  * (SEMVER-MINOR) support object property mocking (Idan Goshen) https://github.com/nodejs/node/pull/58438
worker:
  * (SEMVER-MINOR) add cpu profile APIs for worker (theanarkh) https://github.com/nodejs/node/pull/59428

PR-URL: https://github.com/nodejs/node/pull/59973
2025-09-24 13:04:16 +00:00
Node.js GitHub Bot d3ac95e6a8 2025-08-27, Version 24.7.0 (Current)
Notable changes:

crypto:
  * update root certificates to NSS 3.114 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59571
  * (SEMVER-MINOR) add AES-OCB Web Cryptography algorithm (Filip Skokan) https://github.com/nodejs/node/pull/59539
  * (SEMVER-MINOR) support ML-KEM in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59569
  * (SEMVER-MINOR) support ML-KEM, DHKEM, and RSASVE key encapsulation mechanisms (Filip Skokan) https://github.com/nodejs/node/pull/59491
  * (SEMVER-MINOR) add argon2() and argon2Sync() methods (Ranieri Althoff) https://github.com/nodejs/node/pull/50353
  * (SEMVER-MINOR) support ML-DSA spki/pkcs8 key formats in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
  * (SEMVER-MINOR) add ChaCha20-Poly1305 Web Cryptography algorithm (Filip Skokan) https://github.com/nodejs/node/pull/59365
  * (SEMVER-MINOR) add subtle.getPublicKey() utility function in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
  * (SEMVER-MINOR) add SHA-3 Web Cryptography digest algorithms (Filip Skokan) https://github.com/nodejs/node/pull/59365
  * (SEMVER-MINOR) add SHAKE Web Cryptography digest algorithms (Filip Skokan) https://github.com/nodejs/node/pull/59365
  * (SEMVER-MINOR) add SubtleCrypto.supports feature detection in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
  * (SEMVER-MINOR) support ML-DSA in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
  * (SEMVER-MINOR) support ML-KEM KeyObject (Filip Skokan) https://github.com/nodejs/node/pull/59461
http:
  * (SEMVER-MINOR) add Agent.agentKeepAliveTimeoutBuffer option (Haram Jeong) https://github.com/nodejs/node/pull/59315
http2:
  * (SEMVER-MINOR) add support for raw header arrays in h2Stream.respond() (Tim Perry) https://github.com/nodejs/node/pull/59455
sea:
  * (SEMVER-MINOR) support execArgv in sea config (Joyee Cheung) https://github.com/nodejs/node/pull/59314
stream:
  * (SEMVER-MINOR) add brotli support to CompressionStream and DecompressionStream (Matthew Aitken) https://github.com/nodejs/node/pull/59464

PR-URL: https://github.com/nodejs/node/pull/59629
2025-08-27 23:16:17 +02:00