Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8a61aaa

Browse filesBrowse files
ishon19aduh95
authored andcommitted
doc: fix inconsistencies in WeakSet and WeakMap comparison details
PR-URL: #56683 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4ade128 commit 8a61aaa
Copy full SHA for 8a61aaa

File tree

Expand file treeCollapse file tree

1 file changed

+8
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-6
lines changed
Open diff view settings
Collapse file

‎doc/api/assert.md‎

Copy file name to clipboardExpand all lines: doc/api/assert.md
+8-6Lines changed: 8 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.