1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibJS: Add missing undefined fallback to IfStatement completions

Also add spec comments.
This commit is contained in:
Linus Groh 2021-12-31 15:38:38 +01:00
parent a6476ad61f
commit d7f6635d55
2 changed files with 23 additions and 4 deletions

View file

@ -0,0 +1,4 @@
test("if statement consequent/alternate expression returns empty completion", () => {
expect(eval("1; if (true) {}")).toBeUndefined();
expect(eval("1; if (false) {} else {}")).toBeUndefined();
});