mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 07:05:06 +00:00
LibJS: Add a tiny little test for the ReferenceError exception
This commit is contained in:
parent
c50fbf6da0
commit
0cbbf6f5eb
1 changed files with 9 additions and 0 deletions
9
Libraries/LibJS/Tests/exception-ReferenceError.js
Normal file
9
Libraries/LibJS/Tests/exception-ReferenceError.js
Normal 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");
|
Loading…
Add table
Add a link
Reference in a new issue