From dab8ab2837ae80b29678d882f2514b987e6764a0 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 2 Dec 2021 09:01:40 +0100 Subject: [PATCH] assert,util: compare RegExp.lastIndex while using deep equal checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 PR-URL: https://github.com/nodejs/node/pull/41020 Reviewed-By: Michaël Zasso Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Anto Aravinth --- 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()`][].