Title: deepStrictEqual and notDeepStrictEqual do not compare Error causes nor AggregateError errors arrays · Issue #51793 · nodejs/node · GitHub
Open Graph Title: deepStrictEqual and notDeepStrictEqual do not compare Error causes nor AggregateError errors arrays · Issue #51793 · nodejs/node
X Title: deepStrictEqual and notDeepStrictEqual do not compare Error causes nor AggregateError errors arrays · Issue #51793 · nodejs/node
Description: 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? Compare 2 Error one with a cause and one witho...
Open Graph Description: 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? Compar...
X Description: 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? Compar...
Opengraph URL: https://github.com/nodejs/node/issues/51793
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"deepStrictEqual and notDeepStrictEqual do not compare Error causes nor AggregateError errors arrays","articleBody":"### Version\n\nv20.9.0\n\n### Platform\n\nLinux DESKTOP-8H17SD6 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\n- Compare 2 Error one with a cause and one without\r\n- Compare 2 Error one with different causes\r\n- Compare 2 AggregateError with different array of errors\r\n\r\nThese 4 calls should not throw.\r\nInversely, replacing notDeepStrictEqual by deepStrictEqual should throw for all.\r\n```js\r\nimport { notDeepStrictEqual } from \"node:assert\";\r\n\r\nnotDeepStrictEqual(\r\n new Error('Test'),\r\n new Error('Test', { cause: new Error('Expected Cause') }),\r\n);\r\n\r\nnotDeepStrictEqual(\r\n new Error('Test', { cause: new Error('Unexpected Cause') }),\r\n new Error('Test'),\r\n);\r\n\r\nnotDeepStrictEqual(\r\n new Error('Test', { cause: new Error('Unexpected Cause') }),\r\n new Error('Test', { cause: new Error('Expected Cause') }),\r\n);\r\n\r\nnotDeepStrictEqual(\r\n new AggregateError([], 'Aggregate Test'),\r\n new AggregateError([new Error('Expected Child')], 'Aggregate Test'),\r\n);\r\n\r\nnotDeepStrictEqual(\r\n new AggregateError([new Error('Unexpected Child')], 'Aggregate Test'),\r\n new AggregateError([], 'Aggregate Test'),\r\n);\r\n\r\nnotDeepStrictEqual(\r\n new AggregateError([new Error('Unexpected Child')], 'Aggregate Test'),\r\n new AggregateError([new Error('Expected Child')], 'Aggregate Test'),\r\n);\r\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery time\n\n### What is the expected behavior? Why is that the expected behavior?\n\nnotDeepStrictEqual should throw when the Error's cause / AggregateError's errors match perfectly recursively.\r\ndeepStrictEqual should throw when the Error's cause / AggregateError's errors do not match perfectly recursively.\n\n### What do you see instead?\n\nnotDeepStrictEqual throw when the Error's cause / AggregateError's errors match perfectly recursively.\r\ndeepStrictEqual do not throw when the Error's cause / AggregateError's errors do not match perfectly recursively.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/Zamralik","@type":"Person","name":"Zamralik"},"datePublished":"2024-02-17T21:08:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/51793/node/issues/51793"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:812ab758-8443-fb07-d4d6-d66c90478f32 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBA6:1E49FF:EF45FF:142D8CC:6A4D85A1 |
| html-safe-nonce | ab37753165f0b801f2f3f0240919b87e6a13ee8f3709dbb858f996061dfb31cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkE2OjFFNDlGRjpFRjQ1RkY6MTQyRDhDQzo2QTREODVBMSIsInZpc2l0b3JfaWQiOiI0Njc1MjA2MDA4NDA5NjM0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5022a04feeb8a6aa582a53795d71bb524191ce74ebf1a09c046f37d8b2596640 |
| hovercard-subject-tag | issue:2140619174 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/51793/issue_layout |
| twitter:image | https://opengraph.githubassets.com/65ecb00c5038db314ba293c8d95b9c9a575575d13a85133974c9d0c56dcf7163/nodejs/node/issues/51793 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/65ecb00c5038db314ba293c8d95b9c9a575575d13a85133974c9d0c56dcf7163/nodejs/node/issues/51793 |
| og:image:alt | 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? Compar... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Zamralik |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6bf61c909482ec3072ef5d7a5a28f2a9d214788c9a44793eca1960048cb05ae |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6702a58b419a792226bd21ef0fb1bcb318bbcaa3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width