import { of } from "rxjs"; import { AttachmentDownloadUrl, AttachmentPreview, AttachmentService, AttachmentUpload } from "../../../AttachmentService"; interface MockAttachmentServiceInterface { downloadUrl: AttachmentDownloadUrl; preview: AttachmentPreview; upload: AttachmentUpload; } export class MockAttachmentService implements AttachmentService { constructor(private readonly state: MockAttachmentServiceInterface) {} public getDownloadUrl() { return of(this.state.downloadUrl); } public getPreview() { return of(this.state.preview); } public getUploadState() { return of(this.state.upload); } public seedPreview() {} public upload(): Promise<{ id: string }> { throw new Error(); } }