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

LibJS: Indent tests with 4 spaces instead of 2

This commit is contained in:
Matthew Olsson 2020-07-06 07:37:45 -07:00 committed by Andreas Kling
parent 15de2eda2b
commit 1ef573eb30
261 changed files with 8536 additions and 8497 deletions

View file

@ -1,51 +1,51 @@
test("basic functionality", () => {
class A {
number() {
return 2;
class A {
number() {
return 2;
}
string() {
return "foo";
}
}
string() {
return "foo";
}
}
const a = new A();
expect(a.number()).toBe(2);
expect(a.string()).toBe("foo");
const a = new A();
expect(a.number()).toBe(2);
expect(a.string()).toBe("foo");
});
test("length", () => {
class A {
method1() {}
class A {
method1() {}
method2(a, b, c, d) {}
method2(a, b, c, d) {}
method3(a, b, ...c) {}
}
method3(a, b, ...c) {}
}
const a = new A();
expect(a.method1).toHaveLength(0);
expect(a.method2).toHaveLength(4);
expect(a.method3).toHaveLength(2);
const a = new A();
expect(a.method1).toHaveLength(0);
expect(a.method2).toHaveLength(4);
expect(a.method3).toHaveLength(2);
});
test("extended name syntax", () => {
class A {
"method with space"() {
return 1;
class A {
"method with space"() {
return 1;
}
12() {
return 2;
}
[`he${"llo"}`]() {
return 3;
}
}
12() {
return 2;
}
[`he${"llo"}`]() {
return 3;
}
}
const a = new A();
expect(a["method with space"]()).toBe(1);
expect(a[12]()).toBe(2);
expect(a.hello()).toBe(3);
const a = new A();
expect(a["method with space"]()).toBe(1);
expect(a[12]()).toBe(2);
expect(a.hello()).toBe(3);
});