1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
// Copyright (C) 2015 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype-@@unscopables
description: >
Initial value of `Symbol.unscopables` property
info: |
22.1.3.32 Array.prototype [ @@unscopables ]
1. Let unscopableList be ObjectCreate(null).
2. Perform CreateDataProperty(unscopableList, "copyWithin", true).
3. Perform CreateDataProperty(unscopableList, "entries", true).
4. Perform CreateDataProperty(unscopableList, "fill", true).
5. Perform CreateDataProperty(unscopableList, "find", true).
6. Perform CreateDataProperty(unscopableList, "findIndex", true).
7. Perform CreateDataProperty(unscopableList, "flat", true).
8. Perform CreateDataProperty(unscopableList, "flatMap", true).
9. Perform CreateDataProperty(unscopableList, "includes", true).
10. Perform CreateDataProperty(unscopableList, "keys", true).
11. Perform CreateDataProperty(unscopableList, "values", true).
12. Assert: Each of the above calls returns true.
13. Return unscopableList.
includes: [propertyHelper.js]
features: [Symbol.unscopables]
---*/
var unscopables = Array.prototype[Symbol.unscopables];
assert.sameValue(Object.getPrototypeOf(unscopables), null);
assert.sameValue(unscopables.copyWithin, true, '`copyWithin` property value');
verifyEnumerable(unscopables, 'copyWithin');
verifyWritable(unscopables, 'copyWithin');
verifyConfigurable(unscopables, 'copyWithin');
assert.sameValue(unscopables.entries, true, '`entries` property value');
verifyEnumerable(unscopables, 'entries');
verifyWritable(unscopables, 'entries');
verifyConfigurable(unscopables, 'entries');
assert.sameValue(unscopables.fill, true, '`fill` property value');
verifyEnumerable(unscopables, 'fill');
verifyWritable(unscopables, 'fill');
verifyConfigurable(unscopables, 'fill');
assert.sameValue(unscopables.find, true, '`find` property value');
verifyEnumerable(unscopables, 'find');
verifyWritable(unscopables, 'find');
verifyConfigurable(unscopables, 'find');
assert.sameValue(unscopables.findIndex, true, '`findIndex` property value');
verifyEnumerable(unscopables, 'findIndex');
verifyWritable(unscopables, 'findIndex');
verifyConfigurable(unscopables, 'findIndex');
assert.sameValue(unscopables.flat, true, '`flat` property value');
verifyEnumerable(unscopables, 'flat');
verifyWritable(unscopables, 'flat');
verifyConfigurable(unscopables, 'flat');
assert.sameValue(unscopables.flatMap, true, '`flatMap` property value');
verifyEnumerable(unscopables, 'flatMap');
verifyWritable(unscopables, 'flatMap');
verifyConfigurable(unscopables, 'flatMap');
assert.sameValue(unscopables.includes, true, '`includes` property value');
verifyEnumerable(unscopables, 'includes');
verifyWritable(unscopables, 'includes');
verifyConfigurable(unscopables, 'includes');
assert.sameValue(unscopables.keys, true, '`keys` property value');
verifyEnumerable(unscopables, 'keys');
verifyWritable(unscopables, 'keys');
verifyConfigurable(unscopables, 'keys');
assert.sameValue(unscopables.values, true, '`values` property value');
verifyEnumerable(unscopables, 'values');
verifyWritable(unscopables, 'values');
verifyConfigurable(unscopables, 'values');
reportCompare(0, 0);
|