You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Fix tests for new call path
We have to mock `fetch` for the caching of the download icon, and then mock out all the function calls used by components to feed a Media object.
This commit is contained in:
@ -213,6 +213,7 @@ export function mkStubRoom(roomId = null) {
|
||||
rawDisplayName: 'Member',
|
||||
roomId: roomId,
|
||||
getAvatarUrl: () => 'mxc://avatar.url/image.png',
|
||||
getMxcAvatarUrl: () => 'mxc://avatar.url/image.png',
|
||||
}),
|
||||
getMembersWithMembership: jest.fn().mockReturnValue([]),
|
||||
getJoinedMembers: jest.fn().mockReturnValue([]),
|
||||
@ -242,6 +243,7 @@ export function mkStubRoom(roomId = null) {
|
||||
removeListener: jest.fn(),
|
||||
getDMInviter: jest.fn(),
|
||||
getAvatarUrl: () => 'mxc://avatar.url/room.png',
|
||||
getMxcAvatarUrl: () => 'mxc://avatar.url/room.png',
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user