Remove ADM2 feature flag

This commit is contained in:
Evan Hahn 2021-12-14 13:24:43 -06:00 committed by GitHub
parent 3ec96bde78
commit 71e9498961
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 19 deletions

View file

@ -0,0 +1,39 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import * as sinon from 'sinon';
import {
AudioDeviceModule,
getAudioDeviceModule,
} from '../../calling/audioDeviceModule';
describe('audio device module', () => {
describe('getAudioDeviceModule', () => {
let sandbox: sinon.SinonSandbox;
beforeEach(() => {
sandbox = sinon.createSandbox();
});
afterEach(() => {
sandbox.restore();
});
it('returns ADM2 on Windows', () => {
sandbox.stub(process, 'platform').get(() => 'win32');
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.WindowsAdm2);
});
it('returns the default module on macOS', () => {
sandbox.stub(process, 'platform').get(() => 'darwin');
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.Default);
});
it('returns the default module on Linux', () => {
sandbox.stub(process, 'platform').get(() => 'linux');
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.Default);
});
});
});