Migrate to stylistic

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-10-16 16:43:07 +01:00
parent d8052e6a73
commit 6c6bf811a6
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
124 changed files with 239 additions and 196 deletions

View file

@ -49,7 +49,7 @@ describe("BreadcrumbsStore", () => {
it("passes through the dynamic room precessors flag", () => {
mocked(client.getVisibleRooms).mockReturnValue(fakeRooms(25));
store.meetsRoomRequirement;
expect(store.meetsRoomRequirement).toBeTruthy();
expect(client.getVisibleRooms).toHaveBeenCalledWith(true);
});
});
@ -57,7 +57,7 @@ describe("BreadcrumbsStore", () => {
describe("And the feature_dynamic_room_predecessors is not enabled", () => {
it("passes through the dynamic room precessors flag", () => {
mocked(client.getVisibleRooms).mockReturnValue(fakeRooms(25));
store.meetsRoomRequirement;
expect(store.meetsRoomRequirement).toBeTruthy();
expect(client.getVisibleRooms).toHaveBeenCalledWith(false);
});
});

View file

@ -70,7 +70,7 @@ describe("OwnProfileStore", () => {
);
try {
await ownProfileStore.start();
} catch (ignore) {}
} catch {}
expect(onUpdate).not.toHaveBeenCalled();
expect(ownProfileStore.displayName).toBe(client.getSafeUserId());

View file

@ -465,7 +465,7 @@ describe("RoomViewStore", function () {
try {
expect(setRoomVisible.mock.calls[i][0]).toEqual(v[0]);
expect(setRoomVisible.mock.calls[i][1]).toEqual(v[1]);
} catch (err) {
} catch {
throw new Error(`i=${i} got ${setRoomVisible.mock.calls[i]} want ${v}`);
}
});

View file

@ -353,7 +353,6 @@ describe("RoomListStore", () => {
const videoRoomKnock = "!videoRoomKnock_server";
const rooms: Room[] = [];
RoomListStore.instance;
mkRoom(client, videoRoomPrivate, rooms);
mkRoom(client, videoRoomPublic, rooms);
mkRoom(client, videoRoomKnock, rooms);

View file

@ -17,7 +17,7 @@ import SpaceStore from "../../../../../src/stores/spaces/SpaceStore";
jest.mock("../../../../../src/settings/SettingsStore");
jest.mock("../../../../../src/stores/spaces/SpaceStore", () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-require-imports
const EventEmitter = require("events");
class MockSpaceStore extends EventEmitter {
isRoomInSpace = jest.fn();