Skip to content

test_runner: add parentId to test events with testId#63435

Open
MoLow wants to merge 1 commit into
nodejs:mainfrom
MoLow:moshe/test-runner-parentId
Open

test_runner: add parentId to test events with testId#63435
MoLow wants to merge 1 commit into
nodejs:mainfrom
MoLow:moshe/test-runner-parentId

Conversation

@MoLow
Copy link
Copy Markdown
Member

@MoLow MoLow commented May 19, 2026

Add parentId to the test:enqueue, test:dequeue, test:start,
test:complete, test:pass, and test:fail event payloads. It carries
the enclosing test's testId (or undefined for top-level tests).

Custom reporters need explicit parent linkage to track lineage when
concurrent siblings at the same nesting level interleave their events —
a shared ancestors stack records the wrong parent for every failing leaf
under siblings whose bodies yield before calling t.test(), and the
output tree collapses them to one entry.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels May 19, 2026
Comment thread doc/api/test.md
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (4ee7567) to head (548f144).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #63435   +/-   ##
=======================================
  Coverage   90.05%   90.05%           
=======================================
  Files         714      714           
  Lines      225876   225926   +50     
  Branches    42737    42739    +2     
=======================================
+ Hits       203408   203466   +58     
- Misses      14244    14250    +6     
+ Partials     8224     8210   -14     
Files with missing lines Coverage Δ
lib/internal/test_runner/test.js 97.03% <100.00%> (+<0.01%) ⬆️
lib/internal/test_runner/tests_stream.js 89.00% <100.00%> (+0.34%) ⬆️

... and 43 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
@MoLow MoLow force-pushed the moshe/test-runner-parentId branch from a894092 to 548f144 Compare May 19, 2026 21:10
@atlowChemi atlowChemi added the request-ci Add this label to start a Jenkins CI on a PR. label May 20, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 20, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@MoLow MoLow added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants