-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deepStrictEqual and notDeepStrictEqual do not compare Error causes nor AggregateError errors arrays #51793
Comments
As mentioned in deepstrictequalactual, for
|
I use AggregateError and Error's cause to create a tree to provide an explicit trail of what was wrong and where. Being able to recursively compare the Error's cause/Aggregate's errors in the tests is more thorough that no info on the reason is missing. |
I agree with @zhenweijin that we should just add a special handling for it. It should be pretty straight forward to add that check. |
I'm interested in looking at this issue if it become available 🙇 (I see it's still in Triage) |
Hi, can you assign me to this issue? |
There's an open PR, so it's almost done. |
PR-URL: nodejs#51805 Fixes: nodejs#51793 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: nodejs#51805 Fixes: nodejs#51793 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Version
v20.9.0
Platform
Linux DESKTOP-8H17SD6 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
These 4 calls should not throw.
Inversely, replacing notDeepStrictEqual by deepStrictEqual should throw for all.
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior? Why is that the expected behavior?
notDeepStrictEqual should throw when the Error's cause / AggregateError's errors match perfectly recursively.
deepStrictEqual should throw when the Error's cause / AggregateError's errors do not match perfectly recursively.
What do you see instead?
notDeepStrictEqual throw when the Error's cause / AggregateError's errors match perfectly recursively.
deepStrictEqual do not throw when the Error's cause / AggregateError's errors do not match perfectly recursively.
Additional information
No response
The text was updated successfully, but these errors were encountered: