test: Add mock for storageService.checkVideoDownloadBySourceId

This commit is contained in:
Peifan Li
2025-12-13 16:34:03 -05:00
parent ff80f53039
commit 358c04ba8a

View File

@@ -144,6 +144,7 @@ describe('VideoController', () => {
it('should handle MissAV download', async () => {
req.body = { youtubeUrl: 'https://missav.com/v1' };
(downloadService.downloadMissAVVideo as any).mockResolvedValue({ id: 'v1' });
(storageService.checkVideoDownloadBySourceId as any).mockReturnValue({ found: false });
await downloadVideo(req as Request, res as Response);