Apply strictNullChecks to src/components/views/location/* (#10249
* strict fixes * accessiblebutton without onClick explicit * strict fix for UserMenu BaseAvatar
This commit is contained in:
parent
6de8d85f7e
commit
dd6fc124d7
12 changed files with 46 additions and 31 deletions
|
@ -33,6 +33,7 @@ import { LocationShareType } from "../../../../src/components/views/location/sha
|
|||
import {
|
||||
flushPromisesWithFakeTimers,
|
||||
getMockClientWithEventEmitter,
|
||||
mockClientMethodsUser,
|
||||
setupAsyncStoreWithClient,
|
||||
} from "../../../test-utils";
|
||||
import Modal from "../../../../src/Modal";
|
||||
|
@ -74,7 +75,7 @@ jest.mock("../../../../src/Modal", () => ({
|
|||
describe("<LocationShareMenu />", () => {
|
||||
const userId = "@ernie:server.org";
|
||||
const mockClient = getMockClientWithEventEmitter({
|
||||
getUserId: jest.fn().mockReturnValue(userId),
|
||||
...mockClientMethodsUser(userId),
|
||||
getClientWellKnown: jest.fn().mockResolvedValue({
|
||||
map_style_url: "maps.com",
|
||||
}),
|
||||
|
@ -334,7 +335,7 @@ describe("<LocationShareMenu />", () => {
|
|||
|
||||
expect(SettingsStore.setValue).toHaveBeenCalledWith(
|
||||
"feature_location_share_live",
|
||||
undefined,
|
||||
null,
|
||||
SettingLevel.DEVICE,
|
||||
true,
|
||||
);
|
||||
|
|
|
@ -48,6 +48,7 @@ jest.mock("../../../../src/customisations/helpers/UIComponents", () => ({
|
|||
describe("<SpacePanel />", () => {
|
||||
const mockClient = {
|
||||
getUserId: jest.fn().mockReturnValue("@test:test"),
|
||||
getSafeUserId: jest.fn().mockReturnValue("@test:test"),
|
||||
isGuest: jest.fn(),
|
||||
getAccountData: jest.fn(),
|
||||
} as unknown as MatrixClient;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue