fix tests

This commit is contained in:
2026-03-15 22:33:06 +01:00
parent 2d4f1ee314
commit 2406d41dcb
15 changed files with 100 additions and 88 deletions

View File

@@ -39,10 +39,11 @@ describe('UploadService', () => {
success();
},
};
const uploadSpy = spyOn(service as UploadServiceInternals, 'startUpload').and.returnValue(task);
const uploadSpy = spyOn<any>(service as UploadServiceInternals, 'startUpload').and.returnValue(task);
const upload = new Upload(new File(['content'], 'test.pdf', {type: 'application/pdf'}));
await service.pushUpload('song-1', upload);
service.pushUpload('song-1', upload);
await Promise.resolve();
expect(uploadSpy).toHaveBeenCalledWith('/attachments/song-1/test.pdf', upload.file);
expect(upload.progress).toBe(50);