Return RLS instance through function to avoid import side effect (#31091)
* Attach function that returns instance So that just importing this file does not create a RLS instance. * Fix jest test
This commit is contained in:
@@ -48,6 +48,9 @@ describe("useRoomListHeaderViewModel", () => {
|
||||
beforeEach(() => {
|
||||
matrixClient = stubClient();
|
||||
space = mkStubRoom("spaceId", "spaceName", matrixClient);
|
||||
jest.spyOn(SettingsStore, "getValue").mockImplementation((name: string): any => {
|
||||
if (name === "RoomList.preferredSorting") return SortingAlgorithm.Recency;
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user