ladybird/Userland/Libraries/LibJS/Tests/statement-with-many-labels.js
Andreas Kling 3252d984ae LibJS: Allow statements to have multiple labels
This is a curious thing that occurs more often than you'd think in
minified JavaScript:

    a: b: c: for (...) { ... break b; ... }
2021-09-26 18:24:19 +02:00

10 lines
196 B
JavaScript

test("basic support for statement with many labels", () => {
function foo() {
a: b: c: for (;;) {
break b;
}
return 1;
}
expect(foo()).toBe(1);
});