Eliminate the use of MatrixClientPeg in utils (#10910)
This commit is contained in:
@@ -37,7 +37,7 @@ describe("RightPanelStore", () => {
|
||||
beforeEach(() => {
|
||||
stubClient();
|
||||
cli = mocked(MatrixClientPeg.get());
|
||||
DMRoomMap.makeShared();
|
||||
DMRoomMap.makeShared(cli);
|
||||
|
||||
// Make sure we start with a clean store
|
||||
store.reset();
|
||||
|
||||
@@ -162,7 +162,7 @@ describe("RoomListStore", () => {
|
||||
room1.updateMyMembership("join");
|
||||
room2.updateMyMembership("join");
|
||||
room3.updateMyMembership("join");
|
||||
DMRoomMap.makeShared();
|
||||
DMRoomMap.makeShared(client);
|
||||
const { store } = createStore();
|
||||
client.getVisibleRooms = jest.fn().mockReturnValue([room1, room2, room3]);
|
||||
|
||||
@@ -274,7 +274,7 @@ describe("RoomListStore", () => {
|
||||
|
||||
it("Passes the feature flag on to the client when asking for visible rooms", () => {
|
||||
// Given a store that we can ask for a room list
|
||||
DMRoomMap.makeShared();
|
||||
DMRoomMap.makeShared(client);
|
||||
const { store } = createStore();
|
||||
client.getVisibleRooms = jest.fn().mockReturnValue([]);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ describe("Algorithm", () => {
|
||||
beforeEach(() => {
|
||||
stubClient();
|
||||
client = mocked(MatrixClientPeg.get());
|
||||
DMRoomMap.makeShared();
|
||||
DMRoomMap.makeShared(client);
|
||||
|
||||
algorithm = new Algorithm();
|
||||
algorithm.start();
|
||||
|
||||
Reference in New Issue
Block a user