You've already forked matrix-react-sdk
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:
committed by
GitHub
parent
a0c2676c38
commit
30429df948
@@ -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(
|
||||
|
Reference in New Issue
Block a user