You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Conform more of the codebase to strictNullChecks
(#10504
* Conform more of the codebase to `strictNullChecks` * Iterate
This commit is contained in:
committed by
GitHub
parent
6db0c7a1a6
commit
bc60a9b594
@ -163,8 +163,9 @@ describe("DMRoomMap", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
client.getAccountData.mockReturnValue(mkMDirectEvent(mDirectContent));
|
||||
client.getRoom.mockImplementation((roomId: string) =>
|
||||
[bigRoom, smallRoom, dmWithCharlie, dmWithBob].find((room) => room.roomId === roomId),
|
||||
client.getRoom.mockImplementation(
|
||||
(roomId: string) =>
|
||||
[bigRoom, smallRoom, dmWithCharlie, dmWithBob].find((room) => room.roomId === roomId) ?? null,
|
||||
);
|
||||
});
|
||||
|
||||
@ -183,7 +184,7 @@ describe("DMRoomMap", () => {
|
||||
});
|
||||
|
||||
it("excludes rooms that are not found by matrixClient", () => {
|
||||
client.getRoom.mockReset().mockReturnValue(undefined);
|
||||
client.getRoom.mockReset().mockReturnValue(null);
|
||||
const dmRoomMap = new DMRoomMap(client);
|
||||
dmRoomMap.start();
|
||||
expect(dmRoomMap.getUniqueRoomsWithIndividuals()).toEqual({});
|
||||
|
Reference in New Issue
Block a user