ladybird/Userland/Libraries/LibJS/Tests/syntax/if-statement-empty-completion.js
2021-12-31 15:39:25 +01:00

4 lines
205 B
JavaScript

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