@@ -278,6 +278,10 @@ An alias of [`assert.ok()`][].
278278<!-- YAML
279279added: v0.1.21
280280changes:
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.
281285 - version: REPLACEME
282286 pr-url: https://github.com/nodejs/node/pull/57627
283287 description: Invalid dates are now considered equal.
@@ -366,8 +370,10 @@ are also recursively evaluated by the following rules.
366370* Implementation does not test the [ ` [[Prototype]] ` ] [ prototype-spec ] of
367371 objects.
368372* {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.
371377* {RegExp} lastIndex, flags, and source are always compared, even if these
372378 are not enumerable properties.
373379
@@ -472,6 +478,10 @@ parameter is an instance of {Error} then it will be thrown instead of the
472478<!-- YAML
473479added: v1.2.0
474480changes:
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.
475485 - version: REPLACEME
476486 pr-url: https://github.com/nodejs/node/pull/57627
477487 description: Invalid dates are now considered equal.
@@ -540,10 +550,10 @@ are recursively evaluated also by the following rules.
540550* {Map} keys and {Set} items are compared unordered.
541551* Recursion stops when both sides differ or either side encounters a circular
542552 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 .
547557* {RegExp} lastIndex, flags, and source are always compared, even if these
548558 are not enumerable properties.
549559
@@ -2230,6 +2240,10 @@ added:
22302240 - v23.4.0
22312241 - v22.13.0
22322242changes:
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.
22332247 - version: REPLACEME
22342248 pr-url: https://github.com/nodejs/node/pull/57627
22352249 description: Invalid dates are now considered equal.
@@ -2268,10 +2282,10 @@ behaving as a super set of it.
22682282* {Map} keys and {Set} items are compared unordered.
22692283* Recursion stops when both sides differ or both sides encounter a circular
22702284 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 .
22752289* {RegExp} lastIndex, flags, and source are always compared, even if these
22762290 are not enumerable properties.
22772291* Holes in sparse arrays are ignored.
0 commit comments