Angular testing - observable pipe is not a function
问题 I want to write a unit test for a photo-upload-mehtod. But I get the Failed: this.task.snapshotChanges(...).pipe is not a function TypeError: this.task.snapshotChanges(...).pipe is not a function Error. For the sake of simplicity of this question, I put the code all in one method: Component public startUpload(event: FileList) { const file: File = event.item(0); const pathRef = `users/${this.uid}`; this.task = this.service.uploadPhoto(pathRef, file); this.fileRef = this.service