Replace voice broadcast running with resumed (#9502)

This commit is contained in:
Michael Weimann
2022-10-26 12:54:44 +00:00
committed by GitHub
parent 238a2b77af
commit 625971acb5
11 changed files with 22 additions and 22 deletions
@@ -190,9 +190,9 @@ describe("VoiceBroadcastPlayback", () => {
onStateChanged = jest.fn();
});
describe("when there is a running broadcast without chunks yet", () => {
describe(`when there is a ${VoiceBroadcastInfoState.Resumed} broadcast without chunks yet`, () => {
beforeEach(() => {
infoEvent = mkInfoEvent(VoiceBroadcastInfoState.Running);
infoEvent = mkInfoEvent(VoiceBroadcastInfoState.Resumed);
playback = mkPlayback();
setUpChunkEvents([]);
});
@@ -236,9 +236,9 @@ describe("VoiceBroadcastPlayback", () => {
});
});
describe("when there is a running voice broadcast with some chunks", () => {
describe(`when there is a ${VoiceBroadcastInfoState.Resumed} voice broadcast with some chunks`, () => {
beforeEach(() => {
infoEvent = mkInfoEvent(VoiceBroadcastInfoState.Running);
infoEvent = mkInfoEvent(VoiceBroadcastInfoState.Resumed);
playback = mkPlayback();
setUpChunkEvents([chunk2Event, chunk0Event, chunk1Event]);
});
@@ -423,15 +423,15 @@ describe("VoiceBroadcastRecording", () => {
await action();
});
itShouldBeInState(VoiceBroadcastInfoState.Running);
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Running);
itShouldBeInState(VoiceBroadcastInfoState.Resumed);
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Resumed);
it("should start the recorder", () => {
expect(mocked(voiceBroadcastRecorder.start)).toHaveBeenCalled();
});
it("should emit a running state changed event", () => {
expect(onStateChanged).toHaveBeenCalledWith(VoiceBroadcastInfoState.Running);
it(`should emit a ${VoiceBroadcastInfoState.Resumed} state changed event`, () => {
expect(onStateChanged).toHaveBeenCalledWith(VoiceBroadcastInfoState.Resumed);
});
});
});