Fix YouTube playback PR review issues

This commit is contained in:
2026-03-25 16:25:57 -07:00
committed by sudacode
parent c95518e94a
commit 58304757aa
7 changed files with 158 additions and 23 deletions

View File

@@ -65,3 +65,12 @@ test('resolveYoutubePlaybackUrl rejects when yt-dlp returns no URL', async () =>
);
});
});
test('resolveYoutubePlaybackUrl rejects when yt-dlp output exceeds capture limit', async () => {
await withFakeYtDlp(`${'x'.repeat(1024 * 1024 + 1)}\n`, async () => {
await assert.rejects(
resolveYoutubePlaybackUrl('https://www.youtube.com/watch?v=abc123'),
/exceeded 1048576 bytes/,
);
});
});