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
@@ -27,9 +27,10 @@ import {
import DMRoomMap from "../../../../../src/utils/DMRoomMap";
import { Action } from "../../../../../src/dispatcher/actions";
import { type ButtonEvent } from "../../../../../src/components/views/elements/AccessibleButton";
import { SDKContext, SdkContextClass } from "../../../../../src/contexts/SDKContext";
import { SDKContext } from "../../../../../src/contexts/SDKContext";
import { SDKContextClass } from "../../../../../src/contexts/SDKContextClass";
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg.ts";
import { TestSdkContext } from "../../../TestSdkContext.ts";
import { TestSDKContext } from "../../../TestSDKContext.ts";
describe("<Pill>", () => {
let client: Mocked<MatrixClient>;
@@ -50,7 +51,7 @@ describe("<Pill>", () => {
const renderPill = (props: PillProps): void => {
const cli = MatrixClientPeg.safeGet();
const mockSdkContext = new TestSdkContext();
const mockSdkContext = new TestSDKContext();
mockSdkContext.client = cli;
const withDefault = {
@@ -78,7 +79,7 @@ describe("<Pill>", () => {
beforeEach(() => {
client = mocked(stubClient());
SdkContextClass.instance.client = client;
SDKContextClass.instance.client = client;
DMRoomMap.makeShared(client);
room1 = new Room(room1Id, client, user1Id);
room1.name = "Room 1";