@@ -686,8 +686,7 @@ are recursively evaluated also by the following rules.
686
686
687
687
### Comparison details
688
688
689
- * Primitive values are compared using the [ SameValue Comparison] [ ] , used by
690
- [ ` Object.is() ` ] [ ] .
689
+ * Primitive values are compared using [ ` Object.is() ` ] [ ] .
691
690
* [ Type tags] [ Object.prototype.toString() ] of objects should be the same.
692
691
* [ ` [[Prototype]] ` ] [ prototype-spec ] of objects are compared using
693
692
the [ ` === ` operator] [ ] .
@@ -741,7 +740,7 @@ assert.deepStrictEqual(date, fakeDate);
741
740
// - Date {}
742
741
743
742
assert .deepStrictEqual (NaN , NaN );
744
- // OK, because of the SameValue comparison
743
+ // OK because Object.is(NaN, NaN) is true.
745
744
746
745
// Different unwrapped numbers:
747
746
assert .deepStrictEqual (new Number (1 ), new Number (2 ));
@@ -757,7 +756,7 @@ assert.deepStrictEqual(new String('foo'), Object('foo'));
757
756
assert .deepStrictEqual (- 0 , - 0 );
758
757
// OK
759
758
760
- // Different zeros using the SameValue Comparison :
759
+ // Different zeros:
761
760
assert .deepStrictEqual (0 , - 0 );
762
761
// AssertionError: Expected inputs to be strictly deep-equal:
763
762
// + actual - expected
@@ -833,7 +832,7 @@ assert.deepStrictEqual(date, fakeDate);
833
832
// - Date {}
834
833
835
834
assert .deepStrictEqual (NaN , NaN );
836
- // OK, because of the SameValue comparison
835
+ // OK because Object.is(NaN, NaN) is true.
837
836
838
837
// Different unwrapped numbers:
839
838
assert .deepStrictEqual (new Number (1 ), new Number (2 ));
@@ -849,7 +848,7 @@ assert.deepStrictEqual(new String('foo'), Object('foo'));
849
848
assert .deepStrictEqual (- 0 , - 0 );
850
849
// OK
851
850
852
- // Different zeros using the SameValue Comparison :
851
+ // Different zeros:
853
852
assert .deepStrictEqual (0 , - 0 );
854
853
// AssertionError: Expected inputs to be strictly deep-equal:
855
854
// + actual - expected
@@ -1734,7 +1733,7 @@ changes:
1734
1733
* ` message ` {string|Error}
1735
1734
1736
1735
Tests strict inequality between the ` actual ` and ` expected ` parameters as
1737
- determined by the [ SameValue Comparison ] [ ] .
1736
+ determined by [ ` Object.is() ` ] [ ] .
1738
1737
1739
1738
``` mjs
1740
1739
import assert from ' assert/strict' ;
@@ -2026,7 +2025,7 @@ changes:
2026
2025
* ` message ` {string|Error}
2027
2026
2028
2027
Tests strict equality between the ` actual ` and ` expected ` parameters as
2029
- determined by the [ SameValue Comparison ] [ ] .
2028
+ determined by [ ` Object.is() ` ] [ ] .
2030
2029
2031
2030
``` mjs
2032
2031
import assert from ' assert/strict' ;
@@ -2446,7 +2445,6 @@ argument.
2446
2445
2447
2446
[ Object wrappers ] : https://developer.mozilla.org/en-US/docs/Glossary/Primitive#Primitive_wrapper_objects_in_JavaScript
2448
2447
[ Object.prototype.toString() ] : https://tc39.github.io/ecma262/#sec-object.prototype.tostring
2449
- [ SameValue Comparison ] : https://tc39.github.io/ecma262/#sec-samevalue
2450
2448
[ `!=` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality
2451
2449
[ `===` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality
2452
2450
[ `==` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality
0 commit comments