mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibJS: Add a tiny little test for the ReferenceError exception
This commit is contained in:
parent
c50fbf6da0
commit
0cbbf6f5eb
Notes:
sideshowbarker
2024-07-19 08:06:01 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/0cbbf6f5ebf
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
Reference in a new issue