From 83c189f365eb6a4967cfb0f2b84bc7c0624c6d76 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Mon, 29 Nov 2021 18:00:26 +0100 Subject: [PATCH] assert,util: compare RegExp.lastIndex while using deep equal checks Compare the `lastIndex` property of regular expressions next to the flags and source property. Fixes: https://github.com/nodejs/node/issues/28766 Signed-off-by: Ruben Bridgewater --- doc/api/assert.md | 10 ++++++++++ lib/internal/util/comparisons.js | 4 +++- test/parallel/test-assert-deep.js | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index a22a6082c3a379..c7e679ef814d8c 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -465,6 +465,9 @@ An alias of [`assert.ok()`][].