mirror of
https://github.com/tc39/test262.git
synced 2025-11-10 00:39:43 +01:00
29 lines
534 B
Plaintext
29 lines
534 B
Plaintext
// Copyright (C) 2017 Caio Lima. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
desc: >
|
|
Getter is called when obj is being deconstructed to a rest Object
|
|
template: default
|
|
esid: pending
|
|
includes: [propertyHelper.js]
|
|
features: [object-rest]
|
|
---*/
|
|
|
|
//- setup
|
|
var x;
|
|
var count = 0;
|
|
//- elems
|
|
{...x}
|
|
//- vals
|
|
{ get v() { count++; return 2; } }
|
|
//- body
|
|
assert.sameValue(count, 1);
|
|
|
|
verifyProperty(x, "v", {
|
|
enumerable: true,
|
|
writable: true,
|
|
configurable: true,
|
|
value: 2
|
|
});
|