This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[cloud_firestore] _CodecUtility isn't testable/mockable. #3012
Labels
You can continue the conversation there. Go to discussion →
For example, mocking arrayUnion with DocumentReference is impossible.
It's because _CodecUtility sees
DocumentReference._deleagte
.https://github.com/FirebaseExtended/flutterfire/blob/77b27d042e766b09ba12a680697b6be38f78564d/packages/cloud_firestore/cloud_firestore/lib/src/utils/codec_utility.dart#L46-L47
delegate
is private. So, we can't mock that.Ofcourse, delegate should be private.
So, I wonder if the solution is to fix
_CodecUtility
testable.The text was updated successfully, but these errors were encountered: