From f75d9ed091827cff322f91cf6f0da519a5d6b030 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..21966d4d140514 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -465,6 +465,9 @@ An alias of [`assert.ok()`][].