@@ -678,8 +678,7 @@ are recursively evaluated also by the following rules.
678
678
679
679
### Comparison details
680
680
681
- * Primitive values are compared using the [ SameValue Comparison] [ ] , used by
682
- [ ` Object.is() ` ] [ ] .
681
+ * Primitive values are compared using [ ` Object.is() ` ] [ ] .
683
682
* [ Type tags] [ Object.prototype.toString() ] of objects should be the same.
684
683
* [ ` [[Prototype]] ` ] [ prototype-spec ] of objects are compared using
685
684
the [ ` === ` operator] [ ] .
@@ -731,7 +730,7 @@ assert.deepStrictEqual(date, fakeDate);
731
730
// - Date {}
732
731
733
732
assert .deepStrictEqual (NaN , NaN );
734
- // OK, because of the SameValue comparison
733
+ // OK because Object.is(NaN, NaN) is true.
735
734
736
735
// Different unwrapped numbers:
737
736
assert .deepStrictEqual (new Number (1 ), new Number (2 ));
@@ -747,7 +746,7 @@ assert.deepStrictEqual(new String('foo'), Object('foo'));
747
746
assert .deepStrictEqual (- 0 , - 0 );
748
747
// OK
749
748
750
- // Different zeros using the SameValue Comparison :
749
+ // Different zeros:
751
750
assert .deepStrictEqual (0 , - 0 );
752
751
// AssertionError: Expected inputs to be strictly deep-equal:
753
752
// + actual - expected
@@ -823,7 +822,7 @@ assert.deepStrictEqual(date, fakeDate);
823
822
// - Date {}
824
823
825
824
assert .deepStrictEqual (NaN , NaN );
826
- // OK, because of the SameValue comparison
825
+ // OK because Object.is(NaN, NaN) is true.
827
826
828
827
// Different unwrapped numbers:
829
828
assert .deepStrictEqual (new Number (1 ), new Number (2 ));
@@ -839,7 +838,7 @@ assert.deepStrictEqual(new String('foo'), Object('foo'));
839
838
assert .deepStrictEqual (- 0 , - 0 );
840
839
// OK
841
840
842
- // Different zeros using the SameValue Comparison :
841
+ // Different zeros:
843
842
assert .deepStrictEqual (0 , - 0 );
844
843
// AssertionError: Expected inputs to be strictly deep-equal:
845
844
// + actual - expected
@@ -1724,7 +1723,7 @@ changes:
1724
1723
* ` message ` {string|Error}
1725
1724
1726
1725
Tests strict inequality between the ` actual ` and ` expected ` parameters as
1727
- determined by the [ SameValue Comparison ] [ ] .
1726
+ determined by [ ` Object.is() ` ] [ ] .
1728
1727
1729
1728
``` mjs
1730
1729
import assert from ' assert/strict' ;
@@ -2016,7 +2015,7 @@ changes:
2016
2015
* ` message ` {string|Error}
2017
2016
2018
2017
Tests strict equality between the ` actual ` and ` expected ` parameters as
2019
- determined by the [ SameValue Comparison ] [ ] .
2018
+ determined by [ ` Object.is() ` ] [ ] .
2020
2019
2021
2020
``` mjs
2022
2021
import assert from ' assert/strict' ;
@@ -2436,7 +2435,6 @@ argument.
2436
2435
2437
2436
[ Object wrappers ] : https://developer.mozilla.org/en-US/docs/Glossary/Primitive#Primitive_wrapper_objects_in_JavaScript
2438
2437
[ Object.prototype.toString() ] : https://tc39.github.io/ecma262/#sec-object.prototype.tostring
2439
- [ SameValue Comparison ] : https://tc39.github.io/ecma262/#sec-samevalue
2440
2438
[ `!=` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality
2441
2439
[ `===` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality
2442
2440
[ `==` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality
0 commit comments