summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Error/constructor-proto.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/Error/constructor-proto.js')
-rw-r--r--js/src/tests/non262/Error/constructor-proto.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/tests/non262/Error/constructor-proto.js b/js/src/tests/non262/Error/constructor-proto.js
new file mode 100644
index 0000000000..4ddc6025e8
--- /dev/null
+++ b/js/src/tests/non262/Error/constructor-proto.js
@@ -0,0 +1,17 @@
+const nativeErrors = [
+ InternalError,
+ EvalError,
+ RangeError,
+ ReferenceError,
+ SyntaxError,
+ TypeError,
+ URIError
+];
+
+assertEq(Reflect.getPrototypeOf(Error), Function.prototype)
+
+for (const error of nativeErrors)
+ assertEq(Reflect.getPrototypeOf(error), Error);
+
+if (typeof reportCompare === "function")
+ reportCompare(0, 0);