fix: update download test expectations for format fallback chains
Tests expected old single-format strings, updated to match the new fallback chain format: preferred → next best → any.
This commit is contained in:
parent
ac8905ca38
commit
76e6b9727e
1 changed files with 4 additions and 4 deletions
|
|
@ -344,7 +344,7 @@ describe('DownloadService', () => {
|
||||||
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
||||||
expect(args).toContain('-f');
|
expect(args).toContain('-f');
|
||||||
const fIdx = args.indexOf('-f');
|
const fIdx = args.indexOf('-f');
|
||||||
expect(args[fIdx + 1]).toBe('bestvideo[height<=1080]+bestaudio/best[height<=1080]');
|
expect(args[fIdx + 1]).toBe('bestvideo[height<=1080]+bestaudio/bestvideo[height<=1080]*+bestaudio/best[height<=1080]/bestvideo+bestaudio/best');
|
||||||
expect(args).toContain('--merge-output-format');
|
expect(args).toContain('--merge-output-format');
|
||||||
const moIdx = args.indexOf('--merge-output-format');
|
const moIdx = args.indexOf('--merge-output-format');
|
||||||
expect(args[moIdx + 1]).toBe('mkv');
|
expect(args[moIdx + 1]).toBe('mkv');
|
||||||
|
|
@ -431,7 +431,7 @@ describe('DownloadService', () => {
|
||||||
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
||||||
expect(args).toContain('-f');
|
expect(args).toContain('-f');
|
||||||
const fIdx = args.indexOf('-f');
|
const fIdx = args.indexOf('-f');
|
||||||
expect(args[fIdx + 1]).toBe('best');
|
expect(args[fIdx + 1]).toBe('bestvideo+bestaudio/best');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('falls back to -f "bestaudio" for audio when no format profile', async () => {
|
it('falls back to -f "bestaudio" for audio when no format profile', async () => {
|
||||||
|
|
@ -652,7 +652,7 @@ describe('DownloadService', () => {
|
||||||
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
||||||
const fIdx = args.indexOf('-f');
|
const fIdx = args.indexOf('-f');
|
||||||
expect(fIdx).toBeGreaterThanOrEqual(0);
|
expect(fIdx).toBeGreaterThanOrEqual(0);
|
||||||
expect(args[fIdx + 1]).toBe('bestvideo+bestaudio/best');
|
expect(args[fIdx + 1]).toBe('bestvideo+bestaudio/bestvideo*+bestaudio/best');
|
||||||
// Should default to mp4 merge format when containerFormat is null
|
// Should default to mp4 merge format when containerFormat is null
|
||||||
expect(args).toContain('--merge-output-format');
|
expect(args).toContain('--merge-output-format');
|
||||||
const moIdx = args.indexOf('--merge-output-format');
|
const moIdx = args.indexOf('--merge-output-format');
|
||||||
|
|
@ -695,7 +695,7 @@ describe('DownloadService', () => {
|
||||||
|
|
||||||
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
const args = execYtDlpMock.mock.calls[0][0] as string[];
|
||||||
const fIdx = args.indexOf('-f');
|
const fIdx = args.indexOf('-f');
|
||||||
expect(args[fIdx + 1]).toBe('bestvideo+bestaudio/best');
|
expect(args[fIdx + 1]).toBe('bestvideo+bestaudio/bestvideo*+bestaudio/best');
|
||||||
const moIdx = args.indexOf('--merge-output-format');
|
const moIdx = args.indexOf('--merge-output-format');
|
||||||
expect(args[moIdx + 1]).toBe('mkv');
|
expect(args[moIdx + 1]).toBe('mkv');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue