@@ -555,6 +555,9 @@ 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 and errors properties are now compared as well.
558561 - version: v18.0.0
559562 pr-url: https://github.com/nodejs/node/pull/41020
560563 description: Regular expressions lastIndex property is now compared as well.
@@ -621,8 +624,8 @@ are also recursively evaluated by the following rules.
621624 both sides are ` NaN ` .
622625* [ Type tags] [ Object.prototype.toString() ] of objects should be the same.
623626* Only [ enumerable "own" properties] [ ] are considered.
624- * [ ` Error ` ] [ ] names and messages are always compared, even if these are not
625- enumerable properties.
627+ * [ ` Error ` ] [ ] names, messages, causes, and errors are always compared,
628+ even if these are not enumerable properties.
626629* [ Object wrappers] [ ] are compared both as objects and unwrapped values.
627630* ` Object ` properties are compared unordered.
628631* [ ` Map ` ] [ ] keys and [ ` Set ` ] [ ] items are compared unordered.
@@ -736,6 +739,9 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the
736739<!-- YAML
737740added: v1.2.0
738741changes:
742+ - version: REPLACEME
743+ pr-url: https://github.com/nodejs/node/pull/51805
744+ description: Error cause and errors properties are now compared as well.
739745 - version: v18.0.0
740746 pr-url: https://github.com/nodejs/node/pull/41020
741747 description: Regular expressions lastIndex property is now compared as well.
@@ -783,8 +789,9 @@ are recursively evaluated also by the following rules.
783789* [ ` [[Prototype]] ` ] [ prototype-spec ] of objects are compared using
784790 the [ ` === ` operator] [ ] .
785791* Only [ enumerable "own" properties] [ ] are considered.
786- * [ ` Error ` ] [ ] names and messages are always compared, even if these are not
787- enumerable properties.
792+ * [ ` Error ` ] [ ] names, messages, causes, and errors are always compared,
793+ even if these are not enumerable properties.
794+ ` errors ` is also compared.
788795* Enumerable own [ ` Symbol ` ] [ ] properties are compared as well.
789796* [ Object wrappers] [ ] are compared both as objects and unwrapped values.
790797* ` Object ` properties are compared unordered.
0 commit comments