mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:08:13 +00:00
LibJS: Indent tests with 4 spaces instead of 2
This commit is contained in:
parent
15de2eda2b
commit
1ef573eb30
261 changed files with 8536 additions and 8497 deletions
|
@ -1,39 +1,39 @@
|
|||
test("labeled plain scope", () => {
|
||||
test: {
|
||||
let o = 1;
|
||||
expect(o).toBe(1);
|
||||
break test;
|
||||
expect().fail();
|
||||
}
|
||||
test: {
|
||||
let o = 1;
|
||||
expect(o).toBe(1);
|
||||
break test;
|
||||
expect().fail();
|
||||
}
|
||||
});
|
||||
|
||||
test("break on plain scope from inner scope", () => {
|
||||
outer: {
|
||||
{
|
||||
break outer;
|
||||
outer: {
|
||||
{
|
||||
break outer;
|
||||
}
|
||||
expect().fail();
|
||||
}
|
||||
expect().fail();
|
||||
}
|
||||
});
|
||||
|
||||
test("labeled for loop with break", () => {
|
||||
let counter = 0;
|
||||
outer: for (a of [1, 2, 3]) {
|
||||
for (b of [4, 5, 6]) {
|
||||
if (a === 2 && b === 5) break outer;
|
||||
counter++;
|
||||
let counter = 0;
|
||||
outer: for (a of [1, 2, 3]) {
|
||||
for (b of [4, 5, 6]) {
|
||||
if (a === 2 && b === 5) break outer;
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
expect(counter).toBe(4);
|
||||
expect(counter).toBe(4);
|
||||
});
|
||||
|
||||
test("labeled for loop with continue", () => {
|
||||
let counter = 0;
|
||||
outer: for (a of [1, 2, 3]) {
|
||||
for (b of [4, 5, 6]) {
|
||||
if (b === 6) continue outer;
|
||||
counter++;
|
||||
let counter = 0;
|
||||
outer: for (a of [1, 2, 3]) {
|
||||
for (b of [4, 5, 6]) {
|
||||
if (b === 6) continue outer;
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
expect(counter).toBe(6);
|
||||
expect(counter).toBe(6);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue