Uh oh!
There was an error while loading. Please reload this page.
test_runner: add context.log() and test:log event - #64389
Conversation
nodejs-github-bot
commented
Jul 9, 2026
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #64389 +/- ##
=======================================
Coverage 90.24% 90.25% =======================================
Files 741 741 Lines 241375 241410 +35 Branches 45476 45490 +14 =======================================
+ Hits 217822 217876 +54 + Misses 15126 15085 -41 - Partials 8427 8449 +22
🚀 New features to boost your workflow:
|
nodejs-github-bot
commented
Jul 9, 2026
Uh oh!
There was an error while loading. Please reload this page.
The
notable-change Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
nodejs-github-bot
commented
Jul 11, 2026
Commit Queue failed- Loading data for nodejs/node/pull/64389 ✔ Done loading data for nodejs/node/pull/64389 ----------------------------------- PR info ------------------------------------ Title test_runner: add `context.log()` and `test:log` event (#64389) Author Moshe Atlow <moshe@atlow.co.il> (@MoLow) Branch MoLow:test-runner-log -> nodejs:main Labels semver-minor, lib / src, notable-change, author ready, needs-ci Commits 1 - test_runner: add context.log() and test:log event Committers 1 - Moshe 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> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64389 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 09 Jul 2026 09:58:25 GMT ✔ Approvals: 2 ✔ - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/64389#pullrequestreview-4662895197 ✔ - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/64389#pullrequestreview-4664897612 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-07-09T13:47:17Z: https://ci.nodejs.org/job/node-test-pull-request/74690/ - Querying data for job/node-test-pull-request/74690/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 64389 From https://github.com/nodejs/node * branch refs/pull/64389/merge -> FETCH_HEAD ✔ Fetched commits as 26079c0cfa62..645ad450751b -------------------------------------------------------------------------------- Auto-merging doc/api/test.md CONFLICT (content): Merge conflict in doc/api/test.md error: could not apply 645ad45075... test_runner: add context.log() and test:log event hint: After resolving the conflicts, mark them with hint: "git add/rm <pathspec>", then run hint: "git cherry-pick --continue". hint: You can instead skip this commit with "git cherry-pick --skip". hint: To abort and get back to the state before "git cherry-pick", hint: run "git cherry-pick --abort". hint: Disable this message with "git config set advice.mergeConflict false" ✘ Failed to apply patcheshttps://github.com/nodejs/node/actions/runs/29148679566 |
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>
nodejs-github-bot
commented
Jul 12, 2026
nodejs-github-bot
commented
Jul 12, 2026
nodejs-github-bot
commented
Jul 12, 2026
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jul 12, 2026
Landed in 892976d |
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: #64389 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
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: #64389 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
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: #64389 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Notable changes: doc: * add MikeMcC399 as collaborator (Mike McCready) #64656 ffi: * (SEMVER-MINOR) add `getCurrentEventLoop` (Paolo Insogna) #64323 test_runner: * (SEMVER-MINOR) add `context.log()` and `test:log` event (Moshe Atlow) #64389 * (SEMVER-MINOR) report `entryFile` in `TestStream` events (Moshe Atlow) #64309 PR-URL: #64655
Notable changes: doc: * add MikeMcC399 as collaborator (Mike McCready) #64656 ffi: * (SEMVER-MINOR) add `getCurrentEventLoop` (Paolo Insogna) #64323 test_runner: * (SEMVER-MINOR) add `context.log()` and `test:log` event (Moshe Atlow) #64389 * (SEMVER-MINOR) report `entryFile` in `TestStream` events (Moshe Atlow) #64309 PR-URL: #64655
Add a log(message[, data]) method to
TestContextandSuiteContextthat emits a newtest:logevent.Unlike
test:diagnostic, which is buffered so it is emitted in the order tests are defined,test:logis emitted immediately, in the order tests execute, including under process isolation where it bypasses the per-file declaration order buffer.Motivation for adding this
This gives reporters that render the test tree unbuffered a live, attributed logging channel that captured stdout cannot provide under concurrency (see for example https://www.npmjs.com/package/@reporters/live and https://www.npmjs.com/package/@reporters/web).
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.