Mock usage of getRoomUpgradeHistory in SpaceStore tests
This commit is contained in:
parent
5dfe53920c
commit
82ad85a974
2 changed files with 2 additions and 0 deletions
|
@ -77,6 +77,7 @@ describe("SpaceStore", () => {
|
||||||
|
|
||||||
const run = async () => {
|
const run = async () => {
|
||||||
client.getRoom.mockImplementation(roomId => rooms.find(room => room.roomId === roomId));
|
client.getRoom.mockImplementation(roomId => rooms.find(room => room.roomId === roomId));
|
||||||
|
client.getRoomUpgradeHistory.mockImplementation(roomId => [rooms.find(room => room.roomId === roomId)]);
|
||||||
await testUtils.setupAsyncStoreWithClient(store, client);
|
await testUtils.setupAsyncStoreWithClient(store, client);
|
||||||
jest.runAllTimers();
|
jest.runAllTimers();
|
||||||
};
|
};
|
||||||
|
|
|
@ -103,6 +103,7 @@ export function createTestClient() {
|
||||||
isUserIgnored: jest.fn().mockReturnValue(false),
|
isUserIgnored: jest.fn().mockReturnValue(false),
|
||||||
getCapabilities: jest.fn().mockResolvedValue({}),
|
getCapabilities: jest.fn().mockResolvedValue({}),
|
||||||
supportsExperimentalThreads: () => false,
|
supportsExperimentalThreads: () => false,
|
||||||
|
getRoomUpgradeHistory: jest.fn().mockReturnValue([]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue