summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibJS/Tests/exception-ReferenceError.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/exception-ReferenceError.js b/Libraries/LibJS/Tests/exception-ReferenceError.js
new file mode 100644
index 0000000000..2fe47e25a9
--- /dev/null
+++ b/Libraries/LibJS/Tests/exception-ReferenceError.js
@@ -0,0 +1,9 @@
+function assert(x) { if (!x) console.log("FAIL"); }
+
+try {
+ i < 3;
+} catch (e) {
+ assert(e.name === "ReferenceError");
+}
+
+console.log("PASS");