summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/assign/Override.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Object/assign/Override.js')
-rw-r--r--test/built-ins/Object/assign/Override.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/built-ins/Object/assign/Override.js b/test/built-ins/Object/assign/Override.js
index efe94452e..cb0f60a8e 100644
--- a/test/built-ins/Object/assign/Override.js
+++ b/test/built-ins/Object/assign/Override.js
@@ -7,7 +7,9 @@ esid: sec-object.assign
---*/
//"a" will be an property of the final object and the value should be 1
-var target = {a:1};
+var target = {
+ a: 1
+};
/*
"1a2c3" have own enumerable properties, so it Should be wrapped to objects;
{b:6} is an object,should be assigned to final object.
@@ -15,9 +17,15 @@ undefined and null should be ignored;
125 is a number,it cannot has own enumerable properties;
{a:"c"},{a:5} will override property a, the value should be 5.
*/
-var result = Object.assign(target,"1a2c3",{a:"c"},undefined,{b:6},null,125,{a:5});
+var result = Object.assign(target, "1a2c3", {
+ a: "c"
+}, undefined, {
+ b: 6
+}, null, 125, {
+ a: 5
+});
-assert.sameValue(Object.keys(result).length, 7 , "The length should be 7 in the final object.");
+assert.sameValue(Object.keys(result).length, 7, "The length should be 7 in the final object.");
assert.sameValue(result.a, 5, "The value should be {a:5}.");
assert.sameValue(result[0], "1", "The value should be {\"0\":\"1\"}.");
assert.sameValue(result[1], "a", "The value should be {\"1\":\"a\"}.");