blob: aa6e672140ef4294a73ede9107a5b302ee990965 [file] [log] [blame] [edit]
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Getter in object literal is not evaluated
template: default
esid: pending
features: [object-spread]
---*/
//- setup
let o = {a: 2, b: 3};
let executedGetter = false;
//- args
{...o, get c() { executedGetter = true; }}
//- params
obj
//- body
assert.sameValue(obj.a, 2);
assert.sameValue(obj.b, 3);
assert.sameValue(executedGetter, false)
assert.sameValue(Object.keys(obj).length, 3);