Set Trailing Cmma to (#525)

This commit is contained in:
Lipis 2020-01-24 12:04:54 +02:00 committed by GitHub
parent 25202aec11
commit ee68af0fd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 352 additions and 350 deletions

View file

@ -4,7 +4,7 @@ function expectMove<T>(
fn: (elements: T[], indicesToMove: number[]) => void,
elems: T[],
indices: number[],
equal: T[]
equal: T[],
) {
fn(elems, indices);
expect(elems).toEqual(equal);
@ -17,7 +17,7 @@ it("should moveOneLeft", () => {
moveOneLeft,
["a", "b", "c", "d"],
[0, 1, 2, 3],
["a", "b", "c", "d"]
["a", "b", "c", "d"],
);
expectMove(moveOneLeft, ["a", "b", "c", "d"], [1, 3], ["b", "a", "d", "c"]);
});
@ -29,7 +29,7 @@ it("should moveOneRight", () => {
moveOneRight,
["a", "b", "c", "d"],
[0, 1, 2, 3],
["a", "b", "c", "d"]
["a", "b", "c", "d"],
);
expectMove(moveOneRight, ["a", "b", "c", "d"], [0, 2], ["b", "a", "d", "c"]);
});
@ -39,31 +39,31 @@ it("should moveAllLeft", () => {
moveAllLeft,
["a", "b", "c", "d", "e", "f", "g"],
[2, 5],
["c", "f", "a", "b", "d", "e", "g"]
["c", "f", "a", "b", "d", "e", "g"],
);
expectMove(
moveAllLeft,
["a", "b", "c", "d", "e", "f", "g"],
[5],
["f", "a", "b", "c", "d", "e", "g"]
["f", "a", "b", "c", "d", "e", "g"],
);
expectMove(
moveAllLeft,
["a", "b", "c", "d", "e", "f", "g"],
[0, 1, 2, 3, 4, 5, 6],
["a", "b", "c", "d", "e", "f", "g"]
["a", "b", "c", "d", "e", "f", "g"],
);
expectMove(
moveAllLeft,
["a", "b", "c", "d", "e", "f", "g"],
[0, 1, 2],
["a", "b", "c", "d", "e", "f", "g"]
["a", "b", "c", "d", "e", "f", "g"],
);
expectMove(
moveAllLeft,
["a", "b", "c", "d", "e", "f", "g"],
[4, 5, 6],
["e", "f", "g", "a", "b", "c", "d"]
["e", "f", "g", "a", "b", "c", "d"],
);
});
@ -72,30 +72,30 @@ it("should moveAllRight", () => {
moveAllRight,
["a", "b", "c", "d", "e", "f", "g"],
[2, 5],
["a", "b", "d", "e", "g", "c", "f"]
["a", "b", "d", "e", "g", "c", "f"],
);
expectMove(
moveAllRight,
["a", "b", "c", "d", "e", "f", "g"],
[5],
["a", "b", "c", "d", "e", "g", "f"]
["a", "b", "c", "d", "e", "g", "f"],
);
expectMove(
moveAllRight,
["a", "b", "c", "d", "e", "f", "g"],
[0, 1, 2, 3, 4, 5, 6],
["a", "b", "c", "d", "e", "f", "g"]
["a", "b", "c", "d", "e", "f", "g"],
);
expectMove(
moveAllRight,
["a", "b", "c", "d", "e", "f", "g"],
[0, 1, 2],
["d", "e", "f", "g", "a", "b", "c"]
["d", "e", "f", "g", "a", "b", "c"],
);
expectMove(
moveAllRight,
["a", "b", "c", "d", "e", "f", "g"],
[4, 5, 6],
["a", "b", "c", "d", "e", "f", "g"]
["a", "b", "c", "d", "e", "f", "g"],
);
});