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
@@ -26,7 +26,7 @@ import {
} from "../../../../test-utils";
import { UIFeature } from "../../../../../src/settings/UIFeature";
import { SettingLevel } from "../../../../../src/settings/SettingLevel";
import { SdkContextClass } from "../../../../../src/contexts/SDKContext";
import { SDKContextClass } from "../../../../../src/contexts/SDKContextClass";
import { type FeatureSettingKey } from "../../../../../src/settings/Settings.tsx";
import { mockOpenIdConfiguration } from "../../../../test-utils/oidc.ts";
@@ -57,7 +57,7 @@ describe("<UserSettingsDialog />", () => {
const mockSettingsStore = mocked(SettingsStore);
let mockClient!: MockedObject<MatrixClient>;
let sdkContext: SdkContextClass;
let sdkContext: SDKContextClass;
const defaultProps = { onFinished: jest.fn() };
const getComponent = (
props: Partial<typeof defaultProps & { initialTabId?: UserTab; props: Record<string, any> }> = {},
@@ -76,7 +76,7 @@ describe("<UserSettingsDialog />", () => {
getMediaConfig: jest.fn(),
getAuthMetadata: jest.fn().mockResolvedValue(mockOpenIdConfiguration()),
});
sdkContext = new SdkContextClass();
sdkContext = new SDKContextClass();
sdkContext.client = mockClient;
mockSettingsStore.getValue.mockReturnValue(false);
mockSettingsStore.getValueAt.mockReturnValue(false);