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:
@@ -11,7 +11,7 @@ import { mocked } from "jest-mock";
|
||||
import { type Command } from "../../../src/slash-commands/command";
|
||||
import { getCommand } from "../../../src/slash-commands/SlashCommands";
|
||||
import { stubClient } from "../../test-utils";
|
||||
import { SdkContextClass } from "../../../src/contexts/SDKContext";
|
||||
import { SDKContextClass } from "../../../src/contexts/SDKContextClass";
|
||||
import { LocalRoom } from "../../../src/models/LocalRoom";
|
||||
|
||||
export function setUpCommandTest(
|
||||
@@ -40,7 +40,7 @@ export function setUpCommandTest(
|
||||
room = new Room(roomId, client, client.getSafeUserId());
|
||||
}
|
||||
|
||||
jest.spyOn(SdkContextClass.instance.roomViewStore, "getRoomId").mockReturnValue(roomId);
|
||||
jest.spyOn(SDKContextClass.instance.roomViewStore, "getRoomId").mockReturnValue(roomId);
|
||||
|
||||
mocked(client.getRoom).mockImplementation((rId: string): Room | null => {
|
||||
if (rId === roomId) {
|
||||
|
||||
Reference in New Issue
Block a user