Odd assertion error message when deep equality failed due to Error.cause
#55310
Labels
assert
Issues and PRs related to the assert subsystem.
confirmed-bug
Issues with confirmed bugs.
errors
Issues and PRs related to JavaScript errors originated in Node.js core.
Version
v20.18.0
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
I'm not sure what exactly "reference-equal" means, but it sounds like it's about object identity and that might be misleading/bug.
Also ideally it would be nice if assertion diff can show the diff coming from
Error.cause
.What do you see instead?
Assertion error doesn't indicate the error is due to non-matching
Error.cause
:Additional information
I saw Node has expanded on
Error
instance deep equality check #51805 and was testing it around. Vitest is trying to catch up in vitest-dev/vitest#5876 and I thought it would be a good reference to know how Node would handle this.The text was updated successfully, but these errors were encountered: