1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

Base+LibJS+LibWeb: Make prettier clean

Also use "// prettier-ignore" comments where necessary rather than
excluding whole files (via .prettierignore).
This commit is contained in:
Linus Groh 2020-12-26 16:24:24 +01:00 committed by Andreas Kling
parent 76239f89c2
commit 5122f98198
24 changed files with 100 additions and 79 deletions

View file

@ -1,14 +1,11 @@
// This file must not be formatted by prettier. Make sure your IDE
// respects the .prettierignore file!
test("basic functionality", () => {
const A = class {
constructor(x) {
this.x = x;
this.x = x;
}
getX() {
return this.x * 2;
return this.x * 2;
}
};
@ -16,6 +13,7 @@ test("basic functionality", () => {
});
test("inline instantiation", () => {
// prettier-ignore
const a = new class {
constructor() {
this.x = 10;
@ -30,6 +28,7 @@ test("inline instantiation", () => {
});
test("inline instantiation with argument", () => {
// prettier-ignore
const a = new class {
constructor(x) {
this.x = x;
@ -53,7 +52,7 @@ test("extending class expressions", () => {
super(y);
this.y = y * 2;
}
};
}
const a = new A(10);
expect(a.x).toBe(10);
@ -61,9 +60,9 @@ test("extending class expressions", () => {
});
test("class expression name", () => {
let A = class {}
let A = class {};
expect(A.name).toBe("A");
let B = class C {}
let B = class C {};
expect(B.name).toBe("C");
});