mock new settings in tests

This commit is contained in:
Michael Telatynski 2021-06-16 09:14:07 +01:00
parent a75fb98fbc
commit 9e20e5dfc4

View file

@ -123,8 +123,15 @@ describe("SpaceStore", () => {
jest.runAllTimers();
client.getVisibleRooms.mockReturnValue(rooms = []);
getValue.mockImplementation(settingName => {
if (settingName === "feature_spaces") {
return true;
switch (settingName) {
case "feature_spaces":
return true;
case "feature_spaces.all_rooms":
return true;
case "feature_spaces.space_member_dms":
return true;
case "feature_spaces.space_dm_badges":
return false;
}
});
});