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
|
// Copyright (C) 2021 Igalia. 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 ]
...
12. Perform ! CreateDataPropertyOrThrow(unscopableList, "toReversed", true).
13. Perform ! CreateDataPropertyOrThrow(unscopableList, "toSorted", true).
14. Perform ! CreateDataPropertyOrThrow(unscopableList, "toSpliced", true).
...
includes: [propertyHelper.js]
features: [Symbol.unscopables, change-array-by-copy]
---*/
var unscopables = Array.prototype[Symbol.unscopables];
for (const unscopable of ["toReversed", "toSorted", "toSpliced"]) {
verifyProperty(unscopables, unscopable, {
value: true,
writable: true,
configurable: true
})
};
assert(!Object.prototype.hasOwnProperty.call(unscopables, "with"), "does not have `with`");
reportCompare(0, 0);
|