1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:47:35 +00:00

test-js: Use prettier and format all files

This commit is contained in:
Matthew Olsson 2020-07-05 09:27:00 -07:00 committed by Andreas Kling
parent e532888242
commit 6d58c48c2f
248 changed files with 8291 additions and 7725 deletions

View file

@ -1,6 +1,5 @@
test("Issue #1829, if-else without braces or semicolons", () => {
const source =
`if (1)
const source = `if (1)
return 1;
else
return 0;
@ -15,12 +14,11 @@ if (1)
else
return 0;`;
expect(source).toEval();
expect(source).toEval();
});
test("break/continue, variable declaration, do-while, and return asi", () => {
const source =
`function foo() {
const source = `function foo() {
label:
for (var i = 0; i < 4; i++) {
break // semicolon inserted here
@ -41,12 +39,11 @@ var curly/* semicolon inserted here */}
return foo();`;
expect(source).toEvalTo(undefined);
expect(source).toEvalTo(undefined);
});
test("more break and continue asi", () => {
const source =
`let counter = 0;
const source = `let counter = 0;
let outer;
outer:
@ -60,9 +57,9 @@ for (let i = 0; i < 5; ++i) {
return counter;`;
expect(source).toEvalTo(5);
expect(source).toEvalTo(5);
});
test("eof with no semicolon", () => {
expect("var eof").toEval();
expect("var eof").toEval();
});