aboutsummaryrefslogtreecommitdiffstats
path: root/src/spread/obj-skip-non-enumerable.case
blob: bba96e8a9b36c557695405aea748e05d7af0d492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Object Spread doesn't copy non-enumerable properties
template: default
esid: pending
features: [object-spread]
---*/

//- setup

let o = {};
Object.defineProperty(o, "b", {value: 3, enumerable: false});

//- args
{...o}
//- params
obj
//- body
assert.sameValue(obj.hasOwnProperty("b"), false)
assert.sameValue(Object.keys(obj).length, 0);