Revision control

Copy as Markdown

// Copyright (C) 2017 Caio Lima & the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
Object created from rest deconstruction doesn't copy source
object property descriptors.
template: default
esid: pending
includes: [propertyHelper.js]
features: [object-rest]
---*/
//- setup
let rest;
let obj = {};
Object.defineProperty(obj, "a", { value: 3, configurable: false, enumerable: true });
Object.defineProperty(obj, "b", { value: 4, writable: false, enumerable: true });
//- elems
{...rest}
//- vals
obj
//- body
verifyProperty(rest, "a", {
enumerable: true,
writable: true,
configurable: true,
value: 3
});
verifyProperty(rest, "b", {
enumerable: true,
writable: true,
configurable: true,
value: 4
});
//- teardown
promise
.then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE)
.then($DONE, $DONE);