@@ -535,6 +535,8 @@ are also recursively evaluated by the following rules.
535
535
objects.
536
536
* [ ` Symbol ` ] [ ] properties are not compared.
537
537
* [ ` WeakMap ` ] [ ] and [ ` WeakSet ` ] [ ] comparison does not rely on their values.
538
+ * [ ` RegExp ` ] [ ] lastIndex, flags, and source are always compared, even if these
539
+ are not enumerable properties.
538
540
539
541
The following example does not throw an [ ` AssertionError ` ] [ ] because the
540
542
primitives are compared using the [ ` == ` operator] [ ] .
@@ -691,6 +693,8 @@ are recursively evaluated also by the following rules.
691
693
reference.
692
694
* [ ` WeakMap ` ] [ ] and [ ` WeakSet ` ] [ ] comparison does not rely on their values. See
693
695
below for further details.
696
+ * [ ` RegExp ` ] [ ] lastIndex, flags, and source are always compared, even if these
697
+ are not enumerable properties.
694
698
695
699
``` mjs
696
700
import assert from ' node:assert/strict' ;
@@ -958,7 +962,7 @@ benefit in catching a rejection and then rejecting it again. Instead, consider
958
962
adding a comment next to the specific code path that should not reject and keep
959
963
error messages as expressive as possible.
960
964
961
- If specified, ` error ` can be a [ ` Class ` ] [ ] , [ ` RegExp ` ] [ ] or a validation
965
+ If specified, ` error ` can be a [ ` Class ` ] [ ] , [ ` RegExp ` ] [ ] , or a validation
962
966
function. See [ ` assert.throws() ` ] [ ] for more details.
963
967
964
968
Besides the async nature to await the completion behaves identically to
@@ -1040,7 +1044,7 @@ parameter, then an [`AssertionError`][] is thrown. If the error is of a
1040
1044
different type, or if the ` error ` parameter is undefined, the error is
1041
1045
propagated back to the caller.
1042
1046
1043
- If specified, ` error ` can be a [ ` Class ` ] [ ] , [ ` RegExp ` ] [ ] or a validation
1047
+ If specified, ` error ` can be a [ ` Class ` ] [ ] , [ ` RegExp ` ] [ ] , or a validation
1044
1048
function. See [ ` assert.throws() ` ] [ ] for more details.
1045
1049
1046
1050
The following, for instance, will throw the [ ` TypeError ` ] [ ] because there is no
0 commit comments