1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00
ladybird/Userland/Libraries/LibJS/Tests/break-continue-syntax-errors.js
2021-01-12 12:17:46 +01:00

17 lines
581 B
JavaScript

test("'break' syntax errors", () => {
expect("break").not.toEval();
expect("break label").not.toEval();
expect("{ break }").not.toEval();
expect("{ break label }").not.toEval();
expect("label: { break label }").toEval();
});
test("'continue' syntax errors", () => {
expect("continue").not.toEval();
expect("continue label").not.toEval();
expect("{ continue }").not.toEval();
expect("{ continue label }").not.toEval();
expect("label: { continue label }").not.toEval();
expect("switch (true) { case true: continue; }").not.toEval();
});