1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Eliminate the use of MatrixClientPeg in utils (#10910)

This commit is contained in:
Michael Telatynski
2023-05-23 16:24:12 +01:00
committed by GitHub
parent a0c2676c38
commit 30429df948
108 changed files with 409 additions and 325 deletions

View File

@@ -120,7 +120,7 @@ describe("<TextualBody />", () => {
);
it("renders m.emote correctly", () => {
DMRoomMap.makeShared();
DMRoomMap.makeShared(defaultMatrixClient);
const ev = mkEvent({
type: "m.room.message",
@@ -140,7 +140,7 @@ describe("<TextualBody />", () => {
});
it("renders m.notice correctly", () => {
DMRoomMap.makeShared();
DMRoomMap.makeShared(defaultMatrixClient);
const ev = mkEvent({
type: "m.room.message",
@@ -161,7 +161,7 @@ describe("<TextualBody />", () => {
describe("renders plain-text m.text correctly", () => {
beforeEach(() => {
DMRoomMap.makeShared();
DMRoomMap.makeShared(defaultMatrixClient);
});
it("simple message renders as expected", () => {
@@ -264,7 +264,7 @@ describe("<TextualBody />", () => {
isGuest: () => false,
mxcUrlToHttp: (s: string) => s,
});
DMRoomMap.makeShared();
DMRoomMap.makeShared(defaultMatrixClient);
});
it("italics, bold, underline and strikethrough render as expected", () => {
@@ -408,7 +408,7 @@ describe("<TextualBody />", () => {
isGuest: () => false,
mxcUrlToHttp: (s: string) => s,
});
DMRoomMap.makeShared();
DMRoomMap.makeShared(defaultMatrixClient);
const ev = mkRoomTextMessage("Visit https://matrix.org/");
const { container, rerender } = getComponent(