Skip to content

Commit 8a61aaa

Browse files
ishon19aduh95
authored andcommitted
doc: fix inconsistencies in WeakSet and WeakMap comparison details
PR-URL: #56683 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Jason Zhang <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 4ade128 commit 8a61aaa

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

doc/api/assert.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -909,11 +909,12 @@ weakSet2.add(obj);
909909

910910
// Comparing different instances fails, even with same contents
911911
assert.deepStrictEqual(weakSet1, weakSet2);
912-
// AssertionError: Expected inputs to be strictly deep-equal:
912+
// AssertionError: Values have same structure but are not reference-equal:
913913
// + actual - expected
914914
//
915-
// + WeakSet { <items unknown> }
916-
// - WeakSet { <items unknown> }
915+
// WeakSet {
916+
// <items unknown>
917+
// }
917918

918919
// Comparing the same instance to itself succeeds
919920
assert.deepStrictEqual(weakSet1, weakSet1);
@@ -1018,11 +1019,12 @@ weakSet2.add(obj);
10181019

10191020
// Comparing different instances fails, even with same contents
10201021
assert.deepStrictEqual(weakSet1, weakSet2);
1021-
// AssertionError: Expected inputs to be strictly deep-equal:
1022+
// AssertionError: Values have same structure but are not reference-equal:
10221023
// + actual - expected
10231024
//
1024-
// + WeakSet { <items unknown> }
1025-
// - WeakSet { <items unknown> }
1025+
// WeakSet {
1026+
// <items unknown>
1027+
// }
10261028

10271029
// Comparing the same instance to itself succeeds
10281030
assert.deepStrictEqual(weakSet1, weakSet1);

0 commit comments

Comments
 (0)