Skip to content

Commit 68548dc

Browse files
ishon19marco-ippolito
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 337cfb2 commit 68548dc

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
@@ -904,11 +904,12 @@ weakSet2.add(obj);
904904

905905
// Comparing different instances fails, even with same contents
906906
assert.deepStrictEqual(weakSet1, weakSet2);
907-
// AssertionError: Expected inputs to be strictly deep-equal:
907+
// AssertionError: Values have same structure but are not reference-equal:
908908
// + actual - expected
909909
//
910-
// + WeakSet { <items unknown> }
911-
// - WeakSet { <items unknown> }
910+
// WeakSet {
911+
// <items unknown>
912+
// }
912913

913914
// Comparing the same instance to itself succeeds
914915
assert.deepStrictEqual(weakSet1, weakSet1);
@@ -1013,11 +1014,12 @@ weakSet2.add(obj);
10131014

10141015
// Comparing different instances fails, even with same contents
10151016
assert.deepStrictEqual(weakSet1, weakSet2);
1016-
// AssertionError: Expected inputs to be strictly deep-equal:
1017+
// AssertionError: Values have same structure but are not reference-equal:
10171018
// + actual - expected
10181019
//
1019-
// + WeakSet { <items unknown> }
1020-
// - WeakSet { <items unknown> }
1020+
// WeakSet {
1021+
// <items unknown>
1022+
// }
10211023

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

0 commit comments

Comments
 (0)