joao-oliveira-softtor
45b6626457
test_runner: add option to forbid exclusive tests
...
Add --test-forbid-only and the forbidOnly run() option to detect
accidentally committed exclusive tests. Reject only declarations and
runOnly(true) in both isolation modes, and record a run-level failure
so TODO and expected failures cannot absorb the error.
Document the runtime-only detection and add regression coverage for
filtering, option inheritance, both isolation modes, and disabled
guards.
Refs: https://github.com/nodejs/node/issues/60917
Assisted-by: a coding agent
Signed-off-by: João Victor <joao.oliveira@softtor.com.br >
PR-URL: https://github.com/nodejs/node/pull/66578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-10-23 07:04:37 +00:00
Guilherme Araújo
6d4646731e
doc: mark test runner watch mode as stable
...
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/66708
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Tierney Cyren <hello@bnb.im >
2026-10-22 22:59:58 +00:00
Guilherme Araújo
f513ec7e7c
test_runner: add mockReturnValue and promise helpers
...
Add mockReturnValue(), mockResolvedValue() and mockRejectedValue()
to MockFunctionContext as shorthands for common mockImplementation()
patterns.
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/66631
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-10-16 18:06:44 +00:00
Node.js GitHub Bot
496b48b477
2026-10-14, Version 26.12.0 (Current)
...
Notable changes:
doc,lib,src:
* (SEMVER-MINOR) throw on missing WebAssembly or RX support (Paolo Insogna) https://github.com/nodejs/node/pull/66533
http:
* (SEMVER-MINOR) add websocketMask() and websocketUnmask() (James M Snell) https://github.com/nodejs/node/pull/66335
PR-URL: https://github.com/nodejs/node/pull/66684
Signed-off-by: Richard Lau <richard.lau@ibm.com >
2026-10-14 15:17:15 +00:00
Barak
38a5f107bb
test_runner: rerun failing todo tests in suites
...
A failing todo subtest does not fail its parent, so the parent suite was
recorded as passed in the rerun state file along with its children. On
the next run the suite was replayed synthetically and the failing todo
subtest was marked as passed instead of being rerun.
Do not record a passed test whose descendant failed, so the suite body
runs again while passing siblings are still replayed from their own
entries. Document that a failing todo test counts as not yet passed.
Signed-off-by: Barak <26878518+barakor@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/66605
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-10-10 14:36:38 +00:00
Guilherme Araújo
fcfb7ecc0b
test_runner: add mock call assertions to t.assert
...
Add t.assert.called(), t.assert.callCount(), t.assert.nthCalledWith()
and t.assert.lastCalledWith() for asserting on mock function calls.
Assisted-by: Claude
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/66476
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-10-06 05:55:47 +00:00
Marco Ippolito
3c577146aa
src: mark config file as stable
...
Signed-off-by: Marco Ippolito <marcoippolito54@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/66431
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2026-10-05 16:47:38 +00:00
Vasiliy Serpokryl
e898f5ce59
test_runner: do not reuse a worker ID held by a running file
...
Worker IDs were handed out round-robin and never released, so a file
that started after another finished could get an ID still held by a
live process. Track the IDs in use, hand out the lowest free one, and
release it in a finally block once the child process exits.
Refs: https://github.com/nodejs/node/pull/61394
Signed-off-by: Vasiliy Serpokryl <vasiliy.serpokryl@mail.ru >
PR-URL: https://github.com/nodejs/node/pull/65739
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2026-09-22 13:28:01 +00:00
sangwook
29c517f5d4
doc: add test reporter event lifecycle diagram
...
Document the lifecycle of node:test reporter events under
Class: TestsStream, with an ASCII diagram that distinguishes
declaration-order events from their execution-order twins
(test:dequeue/test:complete), the leaf vs suite flow, and the
run-level finale.
Fixes: https://github.com/nodejs/node/issues/51908
Signed-off-by: sangwook <rewq5991@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63780
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-08-27 13:33:23 +03:00
Node.js GitHub Bot
b7ca36421c
2026-08-26, Version 24.20.0 'Krypton' (LTS)
...
Notable changes:
async_hooks:
* (SEMVER-MINOR) add `using` scopes to `AsyncLocalStorage` (Stephen Belanger) https://github.com/nodejs/node/pull/61674
benchmark:
buffer:
* (SEMVER-MINOR) add `end` parameter (Robert Nagy) https://github.com/nodejs/node/pull/62390
crypto:
* update root certificates to NSS 3.125 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/64746
doc:
* add MikeMcC399 as collaborator (Mike McCready) https://github.com/nodejs/node/pull/64656
lib,permission:
* (SEMVER-MINOR) add `permission.drop` (Rafael Gonzaga) https://github.com/nodejs/node/pull/62672
loader:
* (SEMVER-MINOR) implement package maps (Maël Nison) https://github.com/nodejs/node/pull/62239
src,permission:
* (SEMVER-MINOR) add `--permission-audit` (RafaelGSS) https://github.com/nodejs/node/pull/61869
stream:
* (SEMVER-MINOR) implement `node:stream/iter` (James M Snell) https://github.com/nodejs/node/pull/62066
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
wasm:
* (SEMVER-MINOR) enable JSPI (Guy Bedford) https://github.com/nodejs/node/pull/59941
PR-URL: https://github.com/nodejs/node/pull/65461
2026-08-26 16:23:36 +02:00
Chemi Atlow
a674c5d1a3
test_runner: extend tag filter with boolean expression DSL
...
Upgrades the experimental tag filter introduced by stage 1 to accept a
boolean expression instead of a literal tag name.
Grammar: `and`/`&&`, `or`/`||`, `not`/`!`, parentheses for grouping,
and `*` wildcards inside identifiers. Standard precedence
(`not > and > or`); binary operators are left-associative. Word forms
require whitespace separation; punctuation forms do not. Untagged
tests evaluate `false` for any include expression and `true` for
`not X`, so excluding tags does not accidentally remove untagged
tests.
The flag and `testTagFilters` option are still repeatable; multiple
expressions still AND together. Malformed expressions fail fast at
the parent process at startup.
Tag value validation tightens to reject whitespace, operator
characters (`& | ! ( ) *`), and the reserved words `and`/`or`/`not`
in any casing - a breaking change relative to the stage 1 ship,
acceptable at Stability 1.0 (Early development).
Signed-off-by: atlowChemi <chemi@atlow.co.il >
PR-URL: https://github.com/nodejs/node/pull/63054
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2026-08-13 13:26:26 +00:00
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