Migrate to stylistic
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@ import dispatcher from "../../../../../src/dispatcher/dispatcher";
|
||||
import { Action } from "../../../../../src/dispatcher/actions";
|
||||
|
||||
jest.mock("../../../../../src/stores/OwnBeaconStore", () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const EventEmitter = require("events");
|
||||
class MockOwnBeaconStore extends EventEmitter {
|
||||
public getLiveBeaconIdsWithLocationPublishError = jest.fn().mockReturnValue([]);
|
||||
|
||||
@@ -15,7 +15,6 @@ import { makePollStartEvent, mockIntlDateTimeFormat, unmockIntlDateTimeFormat }
|
||||
|
||||
describe("<PollListItem />", () => {
|
||||
const event = makePollStartEvent("Question?", "@me:domain.org");
|
||||
event.getContent().origin;
|
||||
const defaultProps = { event, onClick: jest.fn() };
|
||||
const getComponent = (props = {}) => render(<PollListItem {...defaultProps} {...props} />);
|
||||
|
||||
|
||||
@@ -247,11 +247,11 @@ describe("MessageComposer", () => {
|
||||
});
|
||||
|
||||
describe("UIStore interactions", () => {
|
||||
let resizeCallback: Function;
|
||||
let resizeCallback: (key: string, data: object) => void;
|
||||
|
||||
beforeEach(() => {
|
||||
jest.spyOn(UIStore.instance, "on").mockImplementation(
|
||||
(_event: string | symbol, listener: Function): any => {
|
||||
(_event: string | symbol, listener: (key: string, data: object) => void): any => {
|
||||
resizeCallback = listener;
|
||||
},
|
||||
);
|
||||
|
||||
@@ -564,7 +564,7 @@ describe("RoomHeader", () => {
|
||||
|
||||
jest.spyOn(SdkContextClass.instance.roomViewStore, "isViewingCall").mockReturnValue(true);
|
||||
|
||||
render(<RoomHeader room={room} />, getWrapper()).container;
|
||||
render(<RoomHeader room={room} />, getWrapper());
|
||||
|
||||
expect(getByLabelText(document.body, _t("voip|get_call_link"))).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -210,7 +210,6 @@ describe("RoomList", () => {
|
||||
beforeEach(async () => {
|
||||
cleanup();
|
||||
const rooms: Room[] = [];
|
||||
RoomListStore.instance;
|
||||
testUtils.mkRoom(client, videoRoomPrivate, rooms);
|
||||
testUtils.mkRoom(client, videoRoomPublic, rooms);
|
||||
testUtils.mkRoom(client, videoRoomKnock, rooms);
|
||||
|
||||
@@ -100,7 +100,7 @@ describe("<RoomPreviewBar />", () => {
|
||||
|
||||
afterEach(() => {
|
||||
const container = document.body.firstChild;
|
||||
container && document.body.removeChild(container);
|
||||
if (container) document.body.removeChild(container);
|
||||
});
|
||||
|
||||
it("renders joining message", () => {
|
||||
|
||||
@@ -85,7 +85,7 @@ const drop = async (element: HTMLElement) => {
|
||||
};
|
||||
|
||||
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 {
|
||||
invitedSpaces: SpaceKey[] = [];
|
||||
|
||||
@@ -21,7 +21,7 @@ import { StaticNotificationState } from "../../../../../src/stores/notifications
|
||||
import { NotificationLevel } from "../../../../../src/stores/notifications/NotificationLevel";
|
||||
|
||||
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 {
|
||||
activeSpace: SpaceKey = "!space1";
|
||||
|
||||
Reference in New Issue
Block a user