LibJS: Add a tiny little test for the ReferenceError exception

This commit is contained in:
Andreas Kling 2020-03-28 10:27:48 +01:00
parent c50fbf6da0
commit 0cbbf6f5eb
Notes: sideshowbarker 2024-07-19 08:06:01 +09:00

View file

@ -0,0 +1,9 @@
function assert(x) { if (!x) console.log("FAIL"); }
try {
i < 3;
} catch (e) {
assert(e.name === "ReferenceError");
}
console.log("PASS");