empty-statements.js 419 B

12345678910111213141516171819
  1. test("empty semicolon statements", () => {
  2. expect(";;;").toEval();
  3. });
  4. test("if with no body", () => {
  5. expect("if (true);").toEval();
  6. });
  7. test("chained ifs with no bodies", () => {
  8. expect("if (false); else if (false); else;").toEval();
  9. });
  10. test("while with no body", () => {
  11. expect("while (false);").toEval();
  12. });
  13. test("do while with no body", () => {
  14. expect("do; while (false);").toEval();
  15. });