From 506a798961e36533596593a9338eec0367b7947f Mon Sep 17 00:00:00 2001 From: Jaiwanth Date: Wed, 19 May 2021 15:01:05 +0530 Subject: [PATCH] Add getMember mock --- test/components/views/rooms/MemberList-test.js | 1 + test/test-utils.js | 1 + 2 files changed, 2 insertions(+) diff --git a/test/components/views/rooms/MemberList-test.js b/test/components/views/rooms/MemberList-test.js index 093e5588d0..50b40dea20 100644 --- a/test/components/views/rooms/MemberList-test.js +++ b/test/components/views/rooms/MemberList-test.js @@ -88,6 +88,7 @@ describe('MemberList', () => { }; memberListRoom.currentState = { members: {}, + getMember: jest.fn(), getStateEvents: (eventType, stateKey) => stateKey === undefined ? [] : null, // ignore 3pid invites }; for (const member of [...adminUsers, ...moderatorUsers, ...defaultUsers]) { diff --git a/test/test-utils.js b/test/test-utils.js index 953693a820..d7c960228c 100644 --- a/test/test-utils.js +++ b/test/test-utils.js @@ -245,6 +245,7 @@ export function mkStubRoom(roomId = null) { maySendMessage: jest.fn().mockReturnValue(true), currentState: { getStateEvents: jest.fn(), + getMember: jest.fn(), mayClientSendStateEvent: jest.fn().mockReturnValue(true), maySendStateEvent: jest.fn().mockReturnValue(true), maySendEvent: jest.fn().mockReturnValue(true),