summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Array/from_surfaces.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/Array/from_surfaces.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/tests/non262/Array/from_surfaces.js b/js/src/tests/non262/Array/from_surfaces.js
new file mode 100644
index 0000000000..680b64817c
--- /dev/null
+++ b/js/src/tests/non262/Array/from_surfaces.js
@@ -0,0 +1,13 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/ */
+
+// Check superficial features of Array.from.
+var desc = Object.getOwnPropertyDescriptor(Array, "from");
+assertEq(desc.configurable, true);
+assertEq(desc.enumerable, false);
+assertEq(desc.writable, true);
+assertEq(Array.from.length, 1);
+assertThrowsInstanceOf(() => new Array.from(), TypeError); // not a constructor
+
+if (typeof reportCompare === 'function')
+ reportCompare(0, 0);