@@ -465,6 +465,9 @@ An alias of [`assert.ok()`][].
465
465
<!-- YAML
466
466
added: v0.1.21
467
467
changes:
468
+ - version: REPLACEME
469
+ pr-url: https://github.com/nodejs/node/pull/41020
470
+ description: Regular expressions lastIndex property is now compared as well.
468
471
- version:
469
472
- v16.0.0
470
473
- v14.18.0
@@ -539,6 +542,8 @@ are also recursively evaluated by the following rules.
539
542
objects.
540
543
* [ ` Symbol ` ] [ ] properties are not compared.
541
544
* [ ` WeakMap ` ] [ ] and [ ` WeakSet ` ] [ ] comparison does not rely on their values.
545
+ * [ ` RegExp ` ] [ ] lastIndex, flags and source are always compared, even if these
546
+ are not enumerable properties.
542
547
543
548
The following example does not throw an [ ` AssertionError ` ] [ ] because the
544
549
primitives are considered equal by the [ Abstract Equality Comparison] [ ]
@@ -642,6 +647,9 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the
642
647
<!-- YAML
643
648
added: v1.2.0
644
649
changes:
650
+ - version: REPLACEME
651
+ pr-url: https://github.com/nodejs/node/pull/41020
652
+ description: Regular expressions lastIndex property is now compared as well.
645
653
- version: v9.0.0
646
654
pr-url: https://github.com/nodejs/node/pull/15169
647
655
description: Enumerable symbol properties are now compared.
@@ -697,6 +705,8 @@ are recursively evaluated also by the following rules.
697
705
reference.
698
706
* [ ` WeakMap ` ] [ ] and [ ` WeakSet ` ] [ ] comparison does not rely on their values. See
699
707
below for further details.
708
+ * [ ` RegExp ` ] [ ] lastIndex, flags and source are always compared, even if these
709
+ are not enumerable properties.
700
710
701
711
``` mjs
702
712
import assert from ' assert/strict' ;
0 commit comments