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:
@@ -16,7 +16,7 @@ import type { MediaEventHelper } from "../../../../../src/utils/MediaEventHelper
|
||||
import MVoiceMessageBody from "../../../../../src/components/views/messages/MVoiceMessageBody";
|
||||
import { PlaybackQueue } from "../../../../../src/audio/PlaybackQueue";
|
||||
import { createTestClient } from "../../../../test-utils";
|
||||
import { SdkContextClass } from "../../../../../src/contexts/SDKContext";
|
||||
import { SDKContextClass } from "../../../../../src/contexts/SDKContextClass";
|
||||
|
||||
describe("<MVvoiceMessageBody />", () => {
|
||||
let event: MatrixEvent;
|
||||
@@ -26,7 +26,7 @@ describe("<MVvoiceMessageBody />", () => {
|
||||
|
||||
const matrixClient = createTestClient();
|
||||
const room = new Room("!TESTROOM", matrixClient, "@alice:example.org");
|
||||
const playbackQueue = new PlaybackQueue(room, SdkContextClass.instance.roomViewStore);
|
||||
const playbackQueue = new PlaybackQueue(room, SDKContextClass.instance.roomViewStore);
|
||||
|
||||
jest.spyOn(PlaybackQueue, "forRoom").mockReturnValue(playbackQueue);
|
||||
jest.spyOn(playbackQueue, "unsortedEnqueue").mockReturnValue(undefined);
|
||||
|
||||
Reference in New Issue
Block a user