1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Avoid using deprecated exports, fields, and duplicate code (#12555)

This commit is contained in:
Michael Telatynski
2024-05-28 08:41:20 +01:00
committed by GitHub
parent 1973197eb6
commit 148a360598
33 changed files with 258 additions and 108 deletions

View File

@ -27,7 +27,6 @@ import fetchMock from "fetch-mock-jest";
import { getMockClientWithEventEmitter, mockClientMethodsCrypto, mockPlatformPeg } from "./test-utils";
import { collectBugReport } from "../src/rageshake/submit-rageshake";
import { MatrixClientPeg } from "../src/MatrixClientPeg";
import SettingsStore from "../src/settings/SettingsStore";
import { ConsoleLogger } from "../src/rageshake/rageshake";
@ -45,13 +44,12 @@ describe("Rageshakes", () => {
);
beforeEach(() => {
jest.spyOn(MatrixClientPeg, "getHomeserverName").mockReturnValue("alice-server.com");
mockClient = getMockClientWithEventEmitter({
credentials: { userId: "@test:example.com" },
deviceId: "AAAAAAAAAA",
baseUrl: "https://alice-server.com",
getHomeserverUrl: jest.fn().mockReturnValue("https://alice-server.com"),
getDomain: jest.fn().mockReturnValue("alice-server.com"),
...mockClientMethodsCrypto(),
http: mockHttpAPI,
});