From 52dd8386e23f22efe7ccb7969cba356a697db47c Mon Sep 17 00:00:00 2001 From: Shreyans Pathak Date: Tue, 21 Jan 2025 14:14:52 -0500 Subject: [PATCH] doc: fix inconsistencies in `WeakSet` and `WeakMap` comparison details --- doc/api/assert.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index 32740d2f303a8d..7b5ff9ee4fe804 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -909,11 +909,12 @@ weakSet2.add(obj); // Comparing different instances fails, even with same contents assert.deepStrictEqual(weakSet1, weakSet2); -// AssertionError: Expected inputs to be strictly deep-equal: +// AssertionError: Values have same structure but are not reference-equal: // + actual - expected // -// + WeakSet { } -// - WeakSet { } +// WeakSet { +// +// } // Comparing the same instance to itself succeeds assert.deepStrictEqual(weakSet1, weakSet1); @@ -1018,11 +1019,12 @@ weakSet2.add(obj); // Comparing different instances fails, even with same contents assert.deepStrictEqual(weakSet1, weakSet2); -// AssertionError: Expected inputs to be strictly deep-equal: +// AssertionError: Values have same structure but are not reference-equal: // + actual - expected // -// + WeakSet { } -// - WeakSet { } +// WeakSet { +// +// } // Comparing the same instance to itself succeeds assert.deepStrictEqual(weakSet1, weakSet1);