mirror of https://github.com/vector-im/riot-web
Add getMember mock
parent
e78206301f
commit
506a798961
|
@ -88,6 +88,7 @@ describe('MemberList', () => {
|
||||||
};
|
};
|
||||||
memberListRoom.currentState = {
|
memberListRoom.currentState = {
|
||||||
members: {},
|
members: {},
|
||||||
|
getMember: jest.fn(),
|
||||||
getStateEvents: (eventType, stateKey) => stateKey === undefined ? [] : null, // ignore 3pid invites
|
getStateEvents: (eventType, stateKey) => stateKey === undefined ? [] : null, // ignore 3pid invites
|
||||||
};
|
};
|
||||||
for (const member of [...adminUsers, ...moderatorUsers, ...defaultUsers]) {
|
for (const member of [...adminUsers, ...moderatorUsers, ...defaultUsers]) {
|
||||||
|
|
|
@ -245,6 +245,7 @@ export function mkStubRoom(roomId = null) {
|
||||||
maySendMessage: jest.fn().mockReturnValue(true),
|
maySendMessage: jest.fn().mockReturnValue(true),
|
||||||
currentState: {
|
currentState: {
|
||||||
getStateEvents: jest.fn(),
|
getStateEvents: jest.fn(),
|
||||||
|
getMember: jest.fn(),
|
||||||
mayClientSendStateEvent: jest.fn().mockReturnValue(true),
|
mayClientSendStateEvent: jest.fn().mockReturnValue(true),
|
||||||
maySendStateEvent: jest.fn().mockReturnValue(true),
|
maySendStateEvent: jest.fn().mockReturnValue(true),
|
||||||
maySendEvent: jest.fn().mockReturnValue(true),
|
maySendEvent: jest.fn().mockReturnValue(true),
|
||||||
|
|
Loading…
Reference in New Issue