@@ -555,6 +555,9 @@ An alias of [`assert.ok()`][].
555
555
<!-- YAML
556
556
added: v0.1.21
557
557
changes:
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.
558
561
- version: v18.0.0
559
562
pr-url: https://github.com/nodejs/node/pull/41020
560
563
description: Regular expressions lastIndex property is now compared as well.
@@ -621,8 +624,8 @@ are also recursively evaluated by the following rules.
621
624
both sides are ` NaN ` .
622
625
* [ Type tags] [ Object.prototype.toString() ] of objects should be the same.
623
626
* 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.
626
629
* [ Object wrappers] [ ] are compared both as objects and unwrapped values.
627
630
* ` Object ` properties are compared unordered.
628
631
* [ ` 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
736
739
<!-- YAML
737
740
added: v1.2.0
738
741
changes:
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.
739
745
- version: v18.0.0
740
746
pr-url: https://github.com/nodejs/node/pull/41020
741
747
description: Regular expressions lastIndex property is now compared as well.
@@ -783,8 +789,9 @@ are recursively evaluated also by the following rules.
783
789
* [ ` [[Prototype]] ` ] [ prototype-spec ] of objects are compared using
784
790
the [ ` === ` operator] [ ] .
785
791
* 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.
788
795
* Enumerable own [ ` Symbol ` ] [ ] properties are compared as well.
789
796
* [ Object wrappers] [ ] are compared both as objects and unwrapped values.
790
797
* ` Object ` properties are compared unordered.
0 commit comments