feat(backend): add SIMPLE_STREAMING WebRTC control-path streaming
This commit is contained in:
22
Backend/tests/media-config.test.ts
Normal file
22
Backend/tests/media-config.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, test } from 'bun:test';
|
||||
|
||||
import { parseFeatureFlag } from '../media/config';
|
||||
|
||||
describe('media config feature flags', () => {
|
||||
test('parses enabled values', () => {
|
||||
expect(parseFeatureFlag('true', false)).toBe(true);
|
||||
expect(parseFeatureFlag('1', false)).toBe(true);
|
||||
expect(parseFeatureFlag('yes', false)).toBe(true);
|
||||
});
|
||||
|
||||
test('parses disabled values', () => {
|
||||
expect(parseFeatureFlag('false', true)).toBe(false);
|
||||
expect(parseFeatureFlag('0', true)).toBe(false);
|
||||
expect(parseFeatureFlag('off', true)).toBe(false);
|
||||
});
|
||||
|
||||
test('falls back to default value for unknown input', () => {
|
||||
expect(parseFeatureFlag(undefined, true)).toBe(true);
|
||||
expect(parseFeatureFlag('maybe', false)).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user