@@ -278,6 +278,10 @@ An alias of [`assert.ok()`][].
278
278
<!-- YAML
279
279
added: v0.1.21
280
280
changes:
281
+ - version: REPLACEME
282
+ pr-url: https://github.com/nodejs/node/pull/59448
283
+ description: Promises are not considered equal anymore if they are not of
284
+ the same instance.
281
285
- version: REPLACEME
282
286
pr-url: https://github.com/nodejs/node/pull/57627
283
287
description: Invalid dates are now considered equal.
@@ -366,8 +370,10 @@ are also recursively evaluated by the following rules.
366
370
* Implementation does not test the [ ` [[Prototype]] ` ] [ prototype-spec ] of
367
371
objects.
368
372
* {Symbol} properties are not compared.
369
- * {WeakMap} and {WeakSet} comparison does not rely on their values
370
- but only on their instances.
373
+ * {WeakMap}, {WeakSet} and {Promise} instances are ** not** compared
374
+ structurally. They are only equal if they reference the same object. Any
375
+ comparison between different ` WeakMap ` , ` WeakSet ` , or ` Promise ` instances
376
+ will result in inequality, even if they contain the same content.
371
377
* {RegExp} lastIndex, flags, and source are always compared, even if these
372
378
are not enumerable properties.
373
379
@@ -472,6 +478,10 @@ parameter is an instance of {Error} then it will be thrown instead of the
472
478
<!-- YAML
473
479
added: v1.2.0
474
480
changes:
481
+ - version: REPLACEME
482
+ pr-url: https://github.com/nodejs/node/pull/59448
483
+ description: Promises are not considered equal anymore if they are not of
484
+ the same instance.
475
485
- version: REPLACEME
476
486
pr-url: https://github.com/nodejs/node/pull/57627
477
487
description: Invalid dates are now considered equal.
@@ -540,10 +550,10 @@ are recursively evaluated also by the following rules.
540
550
* {Map} keys and {Set} items are compared unordered.
541
551
* Recursion stops when both sides differ or either side encounters a circular
542
552
reference.
543
- * {WeakMap} and {WeakSet } instances are ** not** compared structurally.
544
- They are only equal if they reference the same object. Any comparison between
545
- different ` WeakMap ` or ` WeakSet ` instances will result in inequality,
546
- even if they contain the same entries .
553
+ * {WeakMap}, {WeakSet} and {Promise } instances are ** not** compared
554
+ structurally. They are only equal if they reference the same object. Any
555
+ comparison between different ` WeakMap ` , ` WeakSet ` , or ` Promise ` instances
556
+ will result in inequality, even if they contain the same content .
547
557
* {RegExp} lastIndex, flags, and source are always compared, even if these
548
558
are not enumerable properties.
549
559
@@ -2230,6 +2240,10 @@ added:
2230
2240
- v23.4.0
2231
2241
- v22.13.0
2232
2242
changes:
2243
+ - version: REPLACEME
2244
+ pr-url: https://github.com/nodejs/node/pull/59448
2245
+ description: Promises are not considered equal anymore if they are not of
2246
+ the same instance.
2233
2247
- version: REPLACEME
2234
2248
pr-url: https://github.com/nodejs/node/pull/57627
2235
2249
description: Invalid dates are now considered equal.
@@ -2268,10 +2282,10 @@ behaving as a super set of it.
2268
2282
* {Map} keys and {Set} items are compared unordered.
2269
2283
* Recursion stops when both sides differ or both sides encounter a circular
2270
2284
reference.
2271
- * {WeakMap} and {WeakSet } instances are ** not** compared structurally.
2272
- They are only equal if they reference the same object. Any comparison between
2273
- different ` WeakMap ` or ` WeakSet ` instances will result in inequality,
2274
- even if they contain the same entries .
2285
+ * {WeakMap}, {WeakSet} and {Promise } instances are ** not** compared
2286
+ structurally. They are only equal if they reference the same object. Any
2287
+ comparison between different ` WeakMap ` , ` WeakSet ` , or ` Promise ` instances
2288
+ will result in inequality, even if they contain the same content .
2275
2289
* {RegExp} lastIndex, flags, and source are always compared, even if these
2276
2290
are not enumerable properties.
2277
2291
* Holes in sparse arrays are ignored.
0 commit comments