not-same-value-x-y-symbol.js (691B)
1 // Copyright (C) 2015 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 19.1.2.10 5 description: > 6 Object.is ( value1, value2 ) 7 8 ... 9 6. If Type(x) is Symbol, then 10 a. If x and y are both the same Symbol value, 11 return true; otherwise, return false. 12 ... 13 features: [Symbol] 14 ---*/ 15 16 assert.sameValue( 17 Object.is(Symbol(), Symbol()), 18 false, 19 "`Object.is(Symbol(), Symbol())` returns `false`" 20 ); 21 assert.sameValue( 22 Object.is(Symbol('description'), Symbol('description')), 23 false, 24 "`Object.is(Symbol('description'), Symbol('description'))` returns `false`" 25 ); 26 27 reportCompare(0, 0);