Serenity Operating System
1test("'break' syntax errors", () => {
2 expect("break").not.toEval();
3 expect("break label").not.toEval();
4 expect("{ break }").not.toEval();
5 expect("{ break label }").not.toEval();
6 expect("label: { break label }").toEval();
7});
8
9test("'continue' syntax errors", () => {
10 expect("continue").not.toEval();
11 expect("continue label").not.toEval();
12 expect("{ continue }").not.toEval();
13 expect("{ continue label }").not.toEval();
14 expect("label: { continue label }").not.toEval();
15
16 expect("switch (true) { case true: continue; }").not.toEval();
17});