mirror of https://github.com/tc39/test262.git
Add unscopable tests
This commit is contained in:
parent
a4aeea09ae
commit
6c5e421806
|
@ -13,13 +13,15 @@ info: |
|
|||
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.
|
||||
7. Perform CreateDataProperty(unscopableList, "findLast", true).
|
||||
8. Perform CreateDataProperty(unscopableList, "findLastIndex", true).
|
||||
9. Perform CreateDataProperty(unscopableList, "flat", true).
|
||||
10. Perform CreateDataProperty(unscopableList, "flatMap", true).
|
||||
11. Perform CreateDataProperty(unscopableList, "includes", true).
|
||||
12. Perform CreateDataProperty(unscopableList, "keys", true).
|
||||
13. Perform CreateDataProperty(unscopableList, "values", true).
|
||||
14. Assert: Each of the above calls returns true.
|
||||
15. Return unscopableList.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol.unscopables]
|
||||
---*/
|
||||
|
@ -53,6 +55,17 @@ verifyEnumerable(unscopables, 'findIndex');
|
|||
verifyWritable(unscopables, 'findIndex');
|
||||
verifyConfigurable(unscopables, 'findIndex');
|
||||
|
||||
|
||||
assert.sameValue(unscopables.findLast, true, '`findLast` property value');
|
||||
verifyEnumerable(unscopables, 'findLast');
|
||||
verifyWritable(unscopables, 'findLast');
|
||||
verifyConfigurable(unscopables, 'findLast');
|
||||
|
||||
assert.sameValue(unscopables.findLastIndex, true, '`findLastIndex` property value');
|
||||
verifyEnumerable(unscopables, 'findLastIndex');
|
||||
verifyWritable(unscopables, 'findLastIndex');
|
||||
verifyConfigurable(unscopables, 'findLastIndex');
|
||||
|
||||
assert.sameValue(unscopables.flat, true, '`flat` property value');
|
||||
verifyEnumerable(unscopables, 'flat');
|
||||
verifyWritable(unscopables, 'flat');
|
||||
|
|
Loading…
Reference in New Issue