Separate out SDKContext (#34053)

* Separate out SDKContext

...from SDKContextClass, as the comments hopefully explain.

Also make the captitalisation consistent.

* Adding the new file usually helps too

* Fix import

* More comment

* Update the various imports of SDKContextClass

* Also fix case of TestSDKContext

* Update the mock
This commit is contained in:
David Baker
2026-07-01 12:49:18 +00:00
committed by GitHub
parent 1c1bda9cab
commit 54d27fd59c
89 changed files with 493 additions and 458 deletions
@@ -31,7 +31,7 @@ import {
import type ResizeNotifier from "../../../../src/utils/ResizeNotifier";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
import { ScopedRoomContextProvider } from "../../../../src/contexts/ScopedRoomContext.tsx";
import { SdkContextClass } from "../../../../src/contexts/SDKContext.ts";
import { SDKContextClass } from "../../../../src/contexts/SDKContextClass";
jest.mock("../../../../src/utils/beacon", () => ({
useBeacon: jest.fn(),
@@ -54,7 +54,7 @@ describe("MessagePanel", function () {
getClientWellKnown: jest.fn().mockReturnValue({}),
supportsThreads: jest.fn().mockReturnValue(true),
});
let sdkContext: SdkContextClass;
let sdkContext: SDKContextClass;
jest.spyOn(MatrixClientPeg, "get").mockReturnValue(client);
const room = new Room(roomId, client, userId);
@@ -106,7 +106,7 @@ describe("MessagePanel", function () {
return arg === "showDisplaynameChanges";
});
sdkContext = new SdkContextClass();
sdkContext = new SDKContextClass();
DMRoomMap.makeShared(client);
});