Conform more code to strict null checking (#10169)
* Conform more code to strict null checking * delint * Iterate * delint * Fix bad test
This commit is contained in:
parent
5123d7e641
commit
e8b92b308b
85 changed files with 283 additions and 287 deletions
|
@ -84,7 +84,7 @@ describe("<BeaconListItem />", () => {
|
|||
|
||||
const member = new RoomMember(roomId, aliceId);
|
||||
member.name = `Alice`;
|
||||
const room = mockClient.getRoom(roomId);
|
||||
const room = mockClient.getRoom(roomId)!;
|
||||
jest.spyOn(room, "getMember").mockReturnValue(member);
|
||||
|
||||
return beacons;
|
||||
|
@ -185,7 +185,7 @@ describe("<BeaconListItem />", () => {
|
|||
const { container } = getComponent({ beacon, onClick });
|
||||
|
||||
// click the beacon name
|
||||
fireEvent.click(container.querySelector(".mx_BeaconStatus_description"));
|
||||
fireEvent.click(container.querySelector(".mx_BeaconStatus_description")!);
|
||||
expect(onClick).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -47,7 +47,7 @@ describe("<ShareLatestLocation />", () => {
|
|||
const { container, asFragment } = getComponent();
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
|
||||
fireEvent.click(container.querySelector(".mx_CopyableText_copyButton"));
|
||||
fireEvent.click(container.querySelector(".mx_CopyableText_copyButton")!);
|
||||
await flushPromises();
|
||||
|
||||
expect(copyPlaintext).toHaveBeenCalledWith("51,42");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue