test262/test/built-ins/Object/assign/OnlyOneArgument.js

15 lines
447 B
JavaScript
Raw Normal View History

2015-06-18 09:23:15 +02:00
// Copyright 2015 Microsoft Corporation. All rights reserved.
// This code is governed by the license found in the LICENSE file.
/*---
description: test Object.Assign(target,...sources),only one argument was passed,
return ToObject(target)
es6id: 19.1.2.1.3
---*/
var target = "a";
var result = Object.assign(target);
2015-06-10 23:53:27 +02:00
assert.sameValue(typeof result, "object");
2015-06-18 09:23:15 +02:00
assert.sameValue(result.valueOf(), "a", "The value should be 'a'.");