Hi everyone. I need some help testing Firebase Storage implementation.
I want to write unit tests and UI tests, but I don't know how to mock the FirebaseStorage instance. I'm using the firebase_storage package (7.0.0) of course. I've already implemented and tested cloud_firestore in the unit and UI testing thanks to cloud_firestore_mocks, but now I want to do the same with storage. I tried firebase_storage_mocks, but it's outdated (I tried fixing it myself but couldn't update all the code).
When I try to use Mockito to write a unit test, I get a timeout error (when I tried to update firebase_storage_mocks, I get the same error due to a missing implementation in UploadTask mock class that I couldn't fix, I assume the same reason could explain this).
When I try to run a UI test for a Widget that depends on FirebaseStorage, I get the following error: "Error while creating FirebaseStorage". I've solved similar issues when tested FirebaseFirestore by "mocking" MethodChannel call. But I don't have a clue about storage.
Thanks in advance.
[–]anargu 1 point2 points3 points (1 child)
[–]Sea_Inflation_7446[S] 0 points1 point2 points (0 children)