Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / assign / Target-String.js
blobaa16b4f2b343ac70658cdd9629c84cc3601bd67f
1 // Copyright 2015 Microsoft Corporation. All rights reserved.
2 // This code is governed by the license found in the LICENSE file.
4 /*---
5 description: >
6   Test the first argument(target) of Object.Assign(target,...sources),
7   if target is String,the return value should be a new object whose value is target.
8 es6id:  19.1.2.1.1
9 ---*/
11 var result = Object.assign("test", {
12   a: 1
13 });
14 assert.sameValue(typeof result, "object", "Return value should be an object.");
15 assert.sameValue(result.valueOf(), "test", "Return value should be 'test'.");
17 reportCompare(0, 0);