Prefer MatrixClientContext over MatrixClientPeg (#10986)

This commit is contained in:
Michael Telatynski 2023-06-14 13:42:07 +01:00 committed by GitHub
parent b40f29f04c
commit 9c48487d85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 120 additions and 87 deletions

View file

@ -19,7 +19,7 @@ import { render } from "@testing-library/react";
import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
import BridgeSettingsTab from "../../../../../../src/components/views/settings/tabs/room/BridgeSettingsTab";
import { getMockClientWithEventEmitter } from "../../../../../test-utils";
import { getMockClientWithEventEmitter, withClientContextRenderOptions } from "../../../../../test-utils";
describe("<BridgeSettingsTab />", () => {
const userId = "@alice:server.org";
@ -28,7 +28,8 @@ describe("<BridgeSettingsTab />", () => {
});
const roomId = "!room:server.org";
const getComponent = (room: Room) => render(<BridgeSettingsTab room={room} />);
const getComponent = (room: Room) =>
render(<BridgeSettingsTab room={room} />, withClientContextRenderOptions(client));
it("renders when room is not bridging messages to any platform", () => {
const room = new Room(roomId, client, userId);