Skip to content

assert: surface prototype mismatch in deepStrictEqual diff #61133

assert: surface prototype mismatch in deepStrictEqual diff

assert: surface prototype mismatch in deepStrictEqual diff #61133

Triggered via pull request October 4, 2026 06:13
@vaputavaputa
opened #66501
Status Failure
Total duration 29s
Artifacts –

commit-lint.yml

on: pull_request_target
lint-commit-message
24s
lint-commit-message
Fit to window
Zoom out
Zoom in

Annotations

1 error and 1 warning
lint-commit-message
# 19d8829bb464c95def02b73748e7e0743db8fbfe ok 1 assisted-by-is-trailer: Assisted-by is a trailer ok 2 co-authored-by-is-trailer: no Co-authored-by metadata ok 3 fixes-url: skipping fixes-url # SKIP ok 4 line-after-title: blank line after title not ok 5 line-length: Line should be <= 72 columns. --- { found: 73, compare: '<=', wanted: 72, at: { line: 28, column: 72, body: [ '', 'deepStrictEqual requires both values to share the same prototype, but', 'the generated diff may not make that failure cause obvious: when both', 'values are inspected identically (e.g. an instance of an anonymous', 'class compared to a plain object) the structural diff shows no', 'difference at all, and when a subclass is involved the mismatch is', 'only visible implicitly through the inspected class-name prefix.', '', 'Append an explicit "Object prototypes differ: X !== Y" line to the', 'generated message when the operator is deepStrictEqual, both values', 'are objects, their top-level prototypes differ, and at least one of', 'the two prototypes is not a default prototype (Object.prototype,', 'Array.prototype or null), because those cases are already clearly', 'visible in the inspect output. The diagnostic covers the top-level', 'values only; prototype differences of nested objects are not', 'reported.', '', 'The diagnostic is derived defensively: the prototype reads and the', "prototype names (derived from a single read of the constructor's", 'name) are wrapped in a try/catch so that exotic objects (e.g. a Proxy', 'with a throwing `getPrototypeOf` trap or a stateful `name` getter)', 'cannot replace the assertion error with a different exception nor', 'leave the global `Error.stackTraceLimit` modified; the hint is simply', 'omitted in that case. When the comparison is made with', '`skipPrototype: true` (via `new assert.Assert({ skipPrototype: true })`),', 'the hint is not added because the explicitly ignored difference is', 'not the cause of the failure.', '', 'Refs: https://github.com/nodejs/node/issues/50397', 'Assisted-by: ZCode (GLM)', 'Signed-off-by: vaputa <2475834+vaputa@users.noreply.github.com>' ] } } ... ok 6 signed-off-by: has valid Signed-off-by ok 7 subsystem: valid subsystems [assert] ok 8 title-format: Title is formatted correctly. 0..8 # tests 8 # pass 6 # fail 1 # Please review the commit message guidelines: # https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines npm warn deprecated tap@16.3.10: Versions of tap before v18 are no longer maintained. Please upgrade. npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm warn deprecated libtap@1.4.1: This library is no longer used by node-tap, and is unmaintained. npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
Workflow execution policy warning (evaluate mode): .github/workflows/commit-lint.yml#L1
On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target