You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Adapt Membership usage for the change to an enum KnownMembership
This commit is contained in:
@ -15,7 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { LocalRoom, LocalRoomState, LOCAL_ROOM_ID_PREFIX } from "../../src/models/LocalRoom";
|
||||
import * as localRoomModule from "../../src/utils/local-room";
|
||||
@ -36,7 +36,7 @@ describe("local-room", () => {
|
||||
beforeEach(() => {
|
||||
client = createTestClient();
|
||||
room1 = new Room("!room1:example.com", client, userId1);
|
||||
room1.getMyMembership = () => Membership.Join;
|
||||
room1.getMyMembership = () => KnownMembership.Join;
|
||||
localRoom = new LocalRoom(LOCAL_ROOM_ID_PREFIX + "test", client, "@test:example.com");
|
||||
mocked(client.getRoom).mockImplementation((roomId: string) => {
|
||||
if (roomId === localRoom.roomId) {
|
||||
|
Reference in New Issue
Block a user