Fix broadcast last sequence number (#9858)
This commit is contained in:
parent
be972bc913
commit
4f0a5d1eb4
2 changed files with 16 additions and 6 deletions
|
@ -254,12 +254,12 @@ describe("VoiceBroadcastRecording", () => {
|
|||
expect(voiceBroadcastRecording.getState()).toBe(VoiceBroadcastInfoState.Started);
|
||||
});
|
||||
|
||||
describe("and calling stop()", () => {
|
||||
describe("and calling stop", () => {
|
||||
beforeEach(() => {
|
||||
voiceBroadcastRecording.stop();
|
||||
});
|
||||
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Stopped, 1);
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Stopped, 0);
|
||||
itShouldBeInState(VoiceBroadcastInfoState.Stopped);
|
||||
|
||||
it("should emit a stopped state changed event", () => {
|
||||
|
@ -351,6 +351,7 @@ describe("VoiceBroadcastRecording", () => {
|
|||
|
||||
itShouldBeInState(VoiceBroadcastInfoState.Stopped);
|
||||
itShouldSendAVoiceMessage([23, 24, 25], 3, getMaxBroadcastLength(), 2);
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Stopped, 2);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -364,6 +365,7 @@ describe("VoiceBroadcastRecording", () => {
|
|||
});
|
||||
|
||||
itShouldSendAVoiceMessage([4, 5, 6], 3, 42, 1);
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Stopped, 1);
|
||||
});
|
||||
|
||||
describe.each([
|
||||
|
@ -375,7 +377,7 @@ describe("VoiceBroadcastRecording", () => {
|
|||
});
|
||||
|
||||
itShouldBeInState(VoiceBroadcastInfoState.Paused);
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Paused, 1);
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Paused, 0);
|
||||
|
||||
it("should stop the recorder", () => {
|
||||
expect(mocked(voiceBroadcastRecorder.stop)).toHaveBeenCalled();
|
||||
|
@ -413,7 +415,7 @@ describe("VoiceBroadcastRecording", () => {
|
|||
});
|
||||
|
||||
itShouldBeInState(VoiceBroadcastInfoState.Resumed);
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Resumed, 1);
|
||||
itShouldSendAnInfoEvent(VoiceBroadcastInfoState.Resumed, 0);
|
||||
|
||||
it("should start the recorder", () => {
|
||||
expect(mocked(voiceBroadcastRecorder.start)).toHaveBeenCalled();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue