1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Apply strictNullChecks to src/components/views/location/* (#10249

* strict fixes

* accessiblebutton without onClick explicit

* strict fix for UserMenu BaseAvatar
This commit is contained in:
Kerry
2023-02-28 21:55:59 +13:00
committed by GitHub
parent 6de8d85f7e
commit dd6fc124d7
12 changed files with 46 additions and 31 deletions

View File

@@ -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,
);