Skip to content

Conversation

@PaulyBearCoding
Copy link

The fullName property exists on SuiteContext at runtime but was not documented.

Tested to verify behavior:

  • Top-level suite: returns suite name
  • Nested suite: returns "Parent > Child" format
  • Implementation confirmed in lib/internal/test_runner/test.js (line 495)

Fixes: #60757

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem. labels Nov 17, 2025
Copy link
Contributor

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just not sure about the version number otherwise lgtm

Copy link
Member

@Renegade334 Renegade334 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please address the commit linter error.

Add documentation for the missing fullName property in SuiteContext class.
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: nodejs#60757
@PaulyBearCoding PaulyBearCoding force-pushed the doc-suitecontext-fullname branch from 43e96d5 to 4a9adfe Compare November 19, 2025 23:43
@PaulyBearCoding
Copy link
Author

Thanks for the reviews! You're right about the version - I checked PR #53169 and the feature was backported to v20.16.0 (released July 24, 2024), so that's the correct "added" version, not v22.3.0.

- Updated both TestContext#fullName and SuiteContext#fullName
- Changed from single version to YAML list format with both v22.3.0 and v20.16.0
- Reflects that fullName was added in v22.3.0 and backported to v20.16.0
@PaulyBearCoding
Copy link
Author

I have addressed both points:

  1. Version formatting - I've updated to the YAML list format:

    added:
      - v22.3.0
      - v20.16.0
  2. TestContext consistency - I've added the same version metadata to TestContext#fullName to keep the documentation consistent.

@Renegade334
Copy link
Member

Can you revert the snapshot changes? Otherwise, all good.

Revert snapshot testing related items back to v22.3.0 as snapshot
testing was never backported to v20.x. Only context.fullName was
backported to v20.16.0.

- Reverted ## Snapshot testing to v22.3.0
- Reverted ## snapshot to v22.3.0
- Reverted snapshot.setDefaultSnapshotSerializers to v22.3.0
- Reverted snapshot.setResolveSnapshotPath to v22.3.0
- Reverted context.assert.snapshot to v22.3.0
- Kept fullName properties with YAML list format (v22.3.0 and v20.16.0)
@PaulyBearCoding
Copy link
Author

I have reverted the snapshot testing changes as requested.

The snapshot-related version metadata has been restored to v22.3.0, while the fullName properties (both TestContext and SuiteContext) now use the YAML list format with both v22.3.0 and v20.16.0.

Copy link
Member

@Renegade334 Renegade334 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Renegade334 Renegade334 added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. labels Nov 22, 2025
@PaulyBearCoding PaulyBearCoding force-pushed the doc-suitecontext-fullname branch from 755c51a to 6e994fe Compare November 23, 2025 05:11
@PaulyBearCoding
Copy link
Author

CI fixed - ready for re-run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SuiteContext missing fullName property that exists at runtime

5 participants