Skip to content

doc: mention constructor check in deepStrictEqual#62010

Open
skdas20 wants to merge 2 commits into
nodejs:mainfrom
skdas20:docs/assert-deepstrict-constructor-60239
Open

doc: mention constructor check in deepStrictEqual#62010
skdas20 wants to merge 2 commits into
nodejs:mainfrom
skdas20:docs/assert-deepstrict-constructor-60239

Conversation

@skdas20

@skdas20 skdas20 commented Feb 26, 2026

Copy link
Copy Markdown

Fixes #60239

Summary

Adds missing comparison detail to assert.deepStrictEqual() docs:

  • Documented that object constructors are compared as part of deep strict equality.

This aligns the assert docs with current behavior and existing util.isDeepStrictEqual() documentation.

Validation

Ran markdown lint on the changed file:

node tools/lint-md/lint-md.mjs doc/api/assert.md

Result: exit code 0.

@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations. labels Feb 26, 2026
Comment thread doc/api/assert.md Outdated
* [`[[Prototype]]`][prototype-spec] of objects are compared using
the [`===` operator][].
* Only [enumerable "own" properties][] are considered.
* Object constructors are compared.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Just for consistency with #60253, this should probably be

Suggested change
* Object constructors are compared.
* Object constructors are compared when available.

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess this is a minimal improvement over the current state. I think including the recommendation by @Renegade334 would be good though

Address review feedback from @Renegade334 for consistency with nodejs#60253.
@Renegade334 Renegade334 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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jul 25, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jul 25, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/62010
✔  Done loading data for nodejs/node/pull/62010
----------------------------------- PR info ------------------------------------
Title      doc: mention constructor check in deepStrictEqual (#62010)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     skdas20:docs/assert-deepstrict-constructor-60239 -> nodejs:main
Labels     assert, doc, author ready, commit-queue-squash
Commits    2
 - doc: mention constructor check in deepStrictEqual
 - doc: clarify object constructors comparison is conditional
Committers 2
 - skdas20 <skdas5405@gmail.com>
 - Sumit Kumar Das <infinix26on@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62010
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62010
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Thu, 26 Feb 2026 18:28:01 GMT
   ✔  Approvals: 2
   ✔  - Ruben Bridgewater (@BridgeAR) (TSC): https://github.com/nodejs/node/pull/62010#pullrequestreview-4115885758
   ✔  - René (@Renegade334): https://github.com/nodejs/node/pull/62010#pullrequestreview-4780166416
   ⚠  GitHub cannot link the author of 'doc: clarify object constructors comparison is conditional' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ✘  1 GitHub CI job(s) failed:
   ✘    - lint-commit-message: FAILURE (https://github.com/nodejs/node/actions/runs/30171196870/job/89721068285)
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/30176654826

@trivikr trivikr removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Jul 26, 2026
@trivikr

trivikr commented Jul 26, 2026

Copy link
Copy Markdown
Member

@skdas20 Can you please sign the first commit and force push?

It's needed as per instructions

Your commit must contain the Signed-off-by line with your name and email address as an acknowledgement that you agree to the Developer Certificate of Origin.

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

Labels

assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update assert.deepStrictEqual docs to mention .constructor property

5 participants