Conform more code to strictNullChecks
and noImplicitAny
(#11156)
This commit is contained in:
parent
46eb34a55d
commit
6836a5fa7b
9 changed files with 36 additions and 19 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
import React from "react";
|
||||
import { render, screen, fireEvent, act } from "@testing-library/react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import UnwrappedSpacePanel from "../../../../src/components/views/spaces/SpacePanel";
|
||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||
|
@ -28,6 +28,7 @@ import { mkStubRoom, wrapInSdkContext } from "../../../test-utils";
|
|||
import { SdkContextClass } from "../../../../src/contexts/SDKContext";
|
||||
import SpaceStore from "../../../../src/stores/spaces/SpaceStore";
|
||||
import DMRoomMap from "../../../../src/utils/DMRoomMap";
|
||||
import { SpaceNotificationState } from "../../../../src/stores/notifications/SpaceNotificationState";
|
||||
|
||||
// DND test utilities based on
|
||||
// https://github.com/colinrobertbrooks/react-beautiful-dnd-test-utils/issues/18#issuecomment-1373388693
|
||||
|
@ -98,8 +99,8 @@ jest.mock("../../../../src/stores/spaces/SpaceStore", () => {
|
|||
enabledMetaSpaces: MetaSpace[] = [];
|
||||
spacePanelSpaces: string[] = [];
|
||||
activeSpace: SpaceKey = "!space1";
|
||||
getChildSpaces = () => [];
|
||||
getNotificationState = () => null;
|
||||
getChildSpaces = () => [] as Room[];
|
||||
getNotificationState = () => null as SpaceNotificationState | null;
|
||||
setActiveSpace = jest.fn();
|
||||
moveRootSpace = jest.fn();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue