summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Array/prototype/Symbol.unscopables/array-find-from-last.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Array/prototype/Symbol.unscopables/array-find-from-last.js')
-rw-r--r--js/src/tests/test262/built-ins/Array/prototype/Symbol.unscopables/array-find-from-last.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Array/prototype/Symbol.unscopables/array-find-from-last.js b/js/src/tests/test262/built-ins/Array/prototype/Symbol.unscopables/array-find-from-last.js
new file mode 100644
index 0000000000..fae0d595c2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Array/prototype/Symbol.unscopables/array-find-from-last.js
@@ -0,0 +1,33 @@
+// Copyright (C) 2022 Microsoft. 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 ]
+
+ ...
+ 7. Perform CreateDataProperty(unscopableList, "findLast", true).
+ 8. Perform CreateDataProperty(unscopableList, "findLastIndex", true).
+ ...
+
+includes: [propertyHelper.js]
+features: [Symbol.unscopables, array-find-from-last]
+---*/
+
+var unscopables = Array.prototype[Symbol.unscopables];
+
+assert.sameValue(Object.getPrototypeOf(unscopables), null);
+
+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');
+
+reportCompare(0, 0);