mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +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,25 +1,25 @@
|
|||
function testArray(arr) {
|
||||
return arr.length === 4 && arr[0] === "a" && arr[1] === "b" && arr[2] === "c" && arr[3] === "d";
|
||||
return arr.length === 4 && arr[0] === "a" && arr[1] === "b" && arr[2] === "c" && arr[3] === "d";
|
||||
}
|
||||
|
||||
test("spreading string literal", () => {
|
||||
expect(["a", ..."bc", "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
expect(["a", ..."bc", "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading string variable", () => {
|
||||
const s = "bc";
|
||||
expect(["a", ...s, "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
const s = "bc";
|
||||
expect(["a", ...s, "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading string in object", () => {
|
||||
const obj = { a: "bc" };
|
||||
expect(["a", ...obj.a, "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
const obj = { a: "bc" };
|
||||
expect(["a", ...obj.a, "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading empty string", () => {
|
||||
expect([..."", "a", ..."bc", ..."", "d", ...""]).toEqual(["a", "b", "c", "d"]);
|
||||
expect([..."", "a", ..."bc", ..."", "d", ...""]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading string objects", () => {
|
||||
expect([..."", ...[...new String("abc")], "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
expect([..."", ...[...new String("abc")], "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue