Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / assign / Target-Object.js
blobf8e8a6840404d5b6972ca963f2d06277cf4d99c1
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 Object,its properties will be the properties of new object.
8 es6id:  19.1.2.1.1
9 ---*/
11 var target = {
12   foo: 1
14 var result = Object.assign(target, {
15   a: 2
16 });
18 assert.sameValue(result.foo, 1, "The value should be {foo: 1}.");
19 assert.sameValue(result.a, 2, "The value should be {a: 2}.");
21 reportCompare(0, 0);