Target-Symbol.js (652B)
1 // Copyright 2015 Microsoft Corporation. All rights reserved. 2 // This code is governed by the license found in the LICENSE file. 3 4 /*--- 5 description: > 6 Test the first argument(target) of Object.Assign(target,...sources), 7 if target is Symbol,the return value should be a new Symbol object whose [[SymbolData]] value is target. 8 es6id: 19.1.2.1.1 9 features: [Symbol] 10 ---*/ 11 12 var target = Symbol('foo'); 13 var result = Object.assign(target, { 14 a: 1 15 }); 16 17 assert.sameValue(typeof result, "object", "Return value should be a symbol object."); 18 assert.sameValue(result.toString(), "Symbol(foo)", "Return value should be 'Symbol(foo)'."); 19 20 reportCompare(0, 0);