@@ -555,6 +555,10 @@ An alias of [`assert.ok()`][].
555555<!-- YAML
556556added: v0.1.21
557557changes:
558+ - version: REPLACEME
559+ pr-url: https://github.com/nodejs/node/pull/51805
560+ description: Error cause property is now compared as well, For AggregateError,
561+ errors property is also compared.
558562 - version: v18.0.0
559563 pr-url: https://github.com/nodejs/node/pull/41020
560564 description: Regular expressions lastIndex property is now compared as well.
@@ -621,8 +625,9 @@ are also recursively evaluated by the following rules.
621625 both sides are ` NaN ` .
622626* [ Type tags] [ Object.prototype.toString() ] of objects should be the same.
623627* Only [ enumerable "own" properties] [ ] are considered.
624- * [ ` Error ` ] [ ] names and messages are always compared, even if these are not
625- enumerable properties.
628+ * [ ` Error ` ] [ ] names, messages and causes are always compared, even if these are
629+ not enumerable properties. For ` AggregateError ` , non-enumerable property
630+ ` errors ` is also compared.
626631* [ Object wrappers] [ ] are compared both as objects and unwrapped values.
627632* ` Object ` properties are compared unordered.
628633* [ ` Map ` ] [ ] keys and [ ` Set ` ] [ ] items are compared unordered.
@@ -736,6 +741,10 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the
736741<!-- YAML
737742added: v1.2.0
738743changes:
744+ - version: REPLACEME
745+ pr-url: https://github.com/nodejs/node/pull/51805
746+ description: Error cause property is now compared as well, For AggregateError,
747+ errors property is also compared.
739748 - version: v18.0.0
740749 pr-url: https://github.com/nodejs/node/pull/41020
741750 description: Regular expressions lastIndex property is now compared as well.
@@ -783,8 +792,9 @@ are recursively evaluated also by the following rules.
783792* [ ` [[Prototype]] ` ] [ prototype-spec ] of objects are compared using
784793 the [ ` === ` operator] [ ] .
785794* Only [ enumerable "own" properties] [ ] are considered.
786- * [ ` Error ` ] [ ] names and messages are always compared, even if these are not
787- enumerable properties.
795+ * [ ` Error ` ] [ ] names, messages and causes are always compared, even if these are
796+ not enumerable properties. For ` AggregateError ` , non-enumerable property
797+ ` errors ` is also compared.
788798* Enumerable own [ ` Symbol ` ] [ ] properties are compared as well.
789799* [ Object wrappers] [ ] are compared both as objects and unwrapped values.
790800* ` Object ` properties are compared unordered.
0 commit comments