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,7 @@ import { PlaybackQueue } from "../../../src/audio/PlaybackQueue";
|
||||
import { type Playback, PlaybackState } from "../../../src/audio/Playback";
|
||||
import { UPDATE_EVENT } from "../../../src/stores/AsyncStore";
|
||||
import { MockedPlayback } from "./MockedPlayback";
|
||||
import { SdkContextClass } from "../../../src/contexts/SDKContext";
|
||||
import { SDKContextClass } from "../../../src/contexts/SDKContextClass";
|
||||
|
||||
describe("PlaybackQueue", () => {
|
||||
let playbackQueue: PlaybackQueue;
|
||||
@@ -22,7 +22,7 @@ describe("PlaybackQueue", () => {
|
||||
mockRoom = {
|
||||
getMember: jest.fn(),
|
||||
} as unknown as Mocked<Room>;
|
||||
playbackQueue = new PlaybackQueue(mockRoom, SdkContextClass.instance.roomViewStore);
|
||||
playbackQueue = new PlaybackQueue(mockRoom, SDKContextClass.instance.roomViewStore);
|
||||
});
|
||||
|
||||
it.each([
|
||||
@@ -76,7 +76,7 @@ describe("PlaybackQueue", () => {
|
||||
`mx_voice_message_clocks_${mockRoom.roomId}`,
|
||||
JSON.stringify(Array.from(clockStates.entries())),
|
||||
);
|
||||
playbackQueue = new PlaybackQueue(mockRoom, SdkContextClass.instance.roomViewStore);
|
||||
playbackQueue = new PlaybackQueue(mockRoom, SDKContextClass.instance.roomViewStore);
|
||||
|
||||
// @ts-ignore
|
||||
expect(playbackQueue.clockStates.has("a")).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user