Skip to content

test_runner: add tags and workerId to SuiteContext - #67312

Merged
nodejs-github-bot merged 3 commits into
nodejs:mainfrom
Han5991:feat/test-runner-suite-context-tags-workerid
Nov 16, 2026
Merged

nodejs-github-bot merged 3 commits into
nodejs:mainfrom
Han5991:feat/test-runner-suite-context-tags-workerid

Conversation

@Han5991

@Han5991 Han5991 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

TestContext exposes tags and workerId, but SuiteContext doesn't, so a
describe() callback can't read the suite's tags, including inherited ones.

This adds both to SuiteContext, like #62504 did for passed, attempt and
diagnostic().

Disclosure: I used a coding agent to help investigate and draft this change. I confirmed the missing properties on a main build, reviewed the change, and verified that the new tests fail without it.

TestContext exposes tags and workerId, but SuiteContext does not, so a
describe() callback cannot read the suite's tags, including the ones
inherited from ancestor suites. Expose both on SuiteContext as well.

Signed-off-by: sangwook <rewq5991@gmail.com>
@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 Nov 7, 2026
@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.72%. Comparing base (a43bfb5) to head (6679c91).
⚠️ Report is 121 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/test.js 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67312      +/-   ##
==========================================
- Coverage   93.00%   90.72%   -2.29%     
==========================================
  Files         428      798     +370     
  Lines      195818   280026   +84208     
  Branches    30283    53858   +23575     
==========================================
+ Hits       182117   254044   +71927     
- Misses      13375    16282    +2907     
- Partials      326     9700    +9374     
Files with missing lines Coverage Δ
lib/internal/test_runner/test.js 97.95% <88.88%> (+<0.01%) ⬆️

... and 521 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.