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:
@@ -12,7 +12,8 @@ import { EventEmitter } from "events";
|
||||
|
||||
import { stubClient } from "../../test-utils";
|
||||
import DMRoomMap from "../../../src/utils/DMRoomMap";
|
||||
import { SDKContext, SdkContextClass } from "../../../src/contexts/SDKContext";
|
||||
import { SDKContext } from "../../../src/contexts/SDKContext";
|
||||
import { SDKContextClass } from "../../../src/contexts/SDKContextClass";
|
||||
import { ScopedRoomContextProvider } from "../../../src/contexts/ScopedRoomContext";
|
||||
import RoomContext, { type RoomContextType } from "../../../src/contexts/RoomContext";
|
||||
import MatrixClientContext from "../../../src/contexts/MatrixClientContext";
|
||||
@@ -21,7 +22,7 @@ import { ModuleApi } from "../../../src/modules/Api";
|
||||
|
||||
describe("ExtrasApi", () => {
|
||||
let client: MatrixClient;
|
||||
let sdkContext: SdkContextClass;
|
||||
let sdkContext: SDKContextClass;
|
||||
let room: Room;
|
||||
let roomContext: RoomContextType;
|
||||
|
||||
@@ -30,7 +31,7 @@ describe("ExtrasApi", () => {
|
||||
room = new Room("!test:room", client, "@alice:example.org", {
|
||||
pendingEventOrdering: PendingEventOrdering.Detached,
|
||||
});
|
||||
sdkContext = new SdkContextClass();
|
||||
sdkContext = new SDKContextClass();
|
||||
sdkContext.client = client;
|
||||
jest.spyOn(sdkContext.roomViewStore, "getRoomId").mockReturnValue(room.roomId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user