mirror of
https://github.com/tc39/test262.git
synced 2025-07-16 10:34:44 +02:00
37 lines
724 B
Plaintext
37 lines
724 B
Plaintext
// Copyright (C) 2017 Caio Lima. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
desc: >
|
|
Rest object doesn't contain non-enumerable properties
|
|
template: default
|
|
esid: pending
|
|
includes: [propertyHelper.js]
|
|
features: [object-rest]
|
|
---*/
|
|
|
|
//- setup
|
|
var rest;
|
|
var obj = {a: 3, b: 4};
|
|
Object.defineProperty(obj, "x", { value: 4, enumerable: false });
|
|
//- elems
|
|
{...rest}
|
|
//- vals
|
|
obj
|
|
//- body
|
|
assert.sameValue(Object.getOwnPropertyDescriptor(rest, "x"), undefined);
|
|
|
|
verifyProperty(rest, "a", {
|
|
enumerable: true,
|
|
writable: true,
|
|
configurable: true,
|
|
value: 3
|
|
});
|
|
|
|
verifyProperty(rest, "b", {
|
|
enumerable: true,
|
|
writable: true,
|
|
configurable: true,
|
|
value: 4
|
|
});
|