emulates-undefined.js (929B)
1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-equality-operators-runtime-semantics-evaluation 5 description: > 6 Strict Equality Comparison doesn't special-case [[IsHTMLDDA]] objects. 7 info: | 8 EqualityExpression : EqualityExpression === RelationalExpression 9 10 [...] 11 5. Return the result of performing Strict Equality Comparison rval === lval. 12 13 Strict Equality Comparison 14 15 1. If Type(x) is different from Type(y), return false. 16 features: [IsHTMLDDA] 17 ---*/ 18 19 var IsHTMLDDA = $262.IsHTMLDDA; 20 21 assert.sameValue(IsHTMLDDA === undefined, false, "=== with `undefined`"); 22 assert.sameValue(undefined === IsHTMLDDA, false, "=== with `undefined`"); 23 24 assert.sameValue(IsHTMLDDA === null, false, "=== with `null`"); 25 assert.sameValue(null === IsHTMLDDA, false, "=== with `null`"); 26 27 assert(IsHTMLDDA === IsHTMLDDA); 28 29 reportCompare(0, 0);