mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
test(app): remove useless frontend tests (#2819)
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import {defaultVideoCodec, publishDefaults, roomOptionDefaults} from './defaults.ts';
|
||||
import {BackupCodecPolicy} from './track/options.ts';
|
||||
import {selectPreferredVideoCodec} from './utils.ts';
|
||||
|
||||
describe('Fluxer media publish defaults', () => {
|
||||
it('defaults new video publishes to an opt-in-safe codec with H.264 backup', () => {
|
||||
expect(defaultVideoCodec).toBe('h264');
|
||||
expect(publishDefaults).toMatchObject({
|
||||
videoCodec: 'h264',
|
||||
backupCodec: {codec: 'h264'},
|
||||
backupCodecPolicy: BackupCodecPolicy.SIMULCAST,
|
||||
degradationPreference: 'maintain-resolution',
|
||||
dtx: false,
|
||||
red: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('falls back away from the opt-in codecs before reaching them', () => {
|
||||
expect(selectPreferredVideoCodec()).toBe('h264');
|
||||
expect(selectPreferredVideoCodec()).not.toBe('av1');
|
||||
expect(selectPreferredVideoCodec()).not.toBe('h265');
|
||||
});
|
||||
|
||||
it('keeps original screen-share publishing at a 4K60-ready transport ceiling', () => {
|
||||
expect(publishDefaults.screenShareEncoding).toMatchObject({
|
||||
maxBitrate: 20_000_000,
|
||||
maxFramerate: 60,
|
||||
priority: 'high',
|
||||
});
|
||||
});
|
||||
|
||||
it('uses publisher-side stream control defaults for high-fidelity screen sharing', () => {
|
||||
expect(roomOptionDefaults).toMatchObject({
|
||||
adaptiveStream: false,
|
||||
dynacast: true,
|
||||
singlePeerConnection: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import {maxEncodingBitrate} from './publishUtils.ts';
|
||||
|
||||
describe('maxEncodingBitrate', () => {
|
||||
it('returns the highest layer bitrate for a simulcast ladder', () => {
|
||||
expect(maxEncodingBitrate([{maxBitrate: 150_000}, {maxBitrate: 500_000}, {maxBitrate: 1_700_000}])).toBe(1_700_000);
|
||||
});
|
||||
|
||||
it('returns the single encoding bitrate for a non-simulcast publish', () => {
|
||||
expect(maxEncodingBitrate([{maxBitrate: 3_000_000}])).toBe(3_000_000);
|
||||
});
|
||||
|
||||
it('returns zero when no encoding declares a bitrate', () => {
|
||||
expect(maxEncodingBitrate([{}])).toBe(0);
|
||||
expect(maxEncodingBitrate([])).toBe(0);
|
||||
expect(maxEncodingBitrate(undefined)).toBe(0);
|
||||
});
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import {videoLayersFromEncodings} from './LocalVideoTrack.ts';
|
||||
|
||||
describe('videoLayersFromEncodings', () => {
|
||||
it('treats SVC codecs without a configured scalability mode as a single layer', () => {
|
||||
const layers = videoLayersFromEncodings(1920, 1080, [{maxBitrate: 12_000_000}], true);
|
||||
expect(layers).toHaveLength(1);
|
||||
expect(layers[0]).toMatchObject({
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
bitrate: 12_000_000,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user