GeezerVison is showing github.com — doc: fix inconsistencies in `WeakSet` and `WeakMap` comparison details · nodejs/node@8a61aaa
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
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 number | Diff line number | Diff line change |
|---|
@@ -909,11 +909,12 @@ weakSet2.add(obj); |
909 | 909 |
|
910 | 910 | // Comparing different instances fails, even with same contents |
911 | 911 | assert.deepStrictEqual(weakSet1, weakSet2); |
912 | | -// AssertionError: Expected inputs to be strictly deep-equal: |
| 912 | +// AssertionError: Values have same structure but are not reference-equal: |
913 | 913 | // + actual - expected |
914 | 914 | // |
915 | | -// + WeakSet { <items unknown> } |
916 | | -// - WeakSet { <items unknown> } |
| 915 | +// WeakSet { |
| 916 | +// <items unknown> |
| 917 | +// } |
917 | 918 |
|
918 | 919 | // Comparing the same instance to itself succeeds |
919 | 920 | assert.deepStrictEqual(weakSet1, weakSet1); |
@@ -1018,11 +1019,12 @@ weakSet2.add(obj); |
1018 | 1019 |
|
1019 | 1020 | // Comparing different instances fails, even with same contents |
1020 | 1021 | assert.deepStrictEqual(weakSet1, weakSet2); |
1021 | | -// AssertionError: Expected inputs to be strictly deep-equal: |
| 1022 | +// AssertionError: Values have same structure but are not reference-equal: |
1022 | 1023 | // + actual - expected |
1023 | 1024 | // |
1024 | | -// + WeakSet { <items unknown> } |
1025 | | -// - WeakSet { <items unknown> } |
| 1025 | +// WeakSet { |
| 1026 | +// <items unknown> |
| 1027 | +// } |
1026 | 1028 |
|
1027 | 1029 | // Comparing the same instance to itself succeeds |
1028 | 1030 | assert.deepStrictEqual(weakSet1, weakSet1); |
|