Conform more code to strictNullChecks (#10444

* Conform more code to `strictNullChecks`

* Fix tests

* Fix tests
This commit is contained in:
Michael Telatynski 2023-03-27 08:01:09 +01:00 committed by GitHub
parent ba2608ec74
commit c225b8ec29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 85 additions and 75 deletions

View file

@ -54,6 +54,7 @@ describe("ForwardDialog", () => {
});
const mockClient = getMockClientWithEventEmitter({
getUserId: jest.fn().mockReturnValue(aliceId),
getSafeUserId: jest.fn().mockReturnValue(aliceId),
isGuest: jest.fn().mockReturnValue(false),
getVisibleRooms: jest.fn().mockReturnValue([]),
getRoom: jest.fn(),
@ -92,6 +93,7 @@ describe("ForwardDialog", () => {
DMRoomMap.makeShared();
jest.clearAllMocks();
mockClient.getUserId.mockReturnValue("@bob:example.org");
mockClient.getSafeUserId.mockReturnValue("@bob:example.org");
mockClient.sendEvent.mockReset();
});