Add labs setting to force small broadcast chunks (#9806)
This commit is contained in:
parent
a1bc4b8e6b
commit
a2777d3a03
6 changed files with 30 additions and 2 deletions
|
@ -17,6 +17,9 @@ limitations under the License.
|
|||
import { mocked } from "jest-mock";
|
||||
|
||||
import SdkConfig, { DEFAULTS } from "../../../src/SdkConfig";
|
||||
import { SettingLevel } from "../../../src/settings/SettingLevel";
|
||||
import { Features } from "../../../src/settings/Settings";
|
||||
import SettingsStore from "../../../src/settings/SettingsStore";
|
||||
import { getChunkLength } from "../../../src/voice-broadcast/utils/getChunkLength";
|
||||
|
||||
jest.mock("../../../src/SdkConfig");
|
||||
|
@ -48,7 +51,7 @@ describe("getChunkLength", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("if there are no defaults", () => {
|
||||
describe("when there are no defaults", () => {
|
||||
beforeEach(() => {
|
||||
DEFAULTS.voice_broadcast = undefined;
|
||||
});
|
||||
|
@ -57,4 +60,14 @@ describe("getChunkLength", () => {
|
|||
expect(getChunkLength()).toBe(120);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when the Features.VoiceBroadcastForceSmallChunks is enabled", () => {
|
||||
beforeEach(async () => {
|
||||
await SettingsStore.setValue(Features.VoiceBroadcastForceSmallChunks, null, SettingLevel.DEVICE, true);
|
||||
});
|
||||
|
||||
it("should return a chunk length of 15 seconds", () => {
|
||||
expect(getChunkLength()).toBe(15);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue