[cloud_firestore] _CodecUtility isn't testable/mockable. #6567
Unanswered
sensuikan1973
asked this question in
Feature request
Replies: 1 comment
-
Related; #4563 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.Beta Was this translation helpful? Give feedback.
All reactions