-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
collection('...').document() should not save a document #20
Comments
Initial Attempt failedInitial attempt that avoids modifying rootParent until updateData and setData failed. This attempt fails to record subcollection whose parent is not saved. This issue requires to save whether a document is stored in the instance or not. Maybe MockFirestoreInstance remembers all saved document location such as |
Note. In real Firestore, creating a non-top-level document does not create its parent document. For example, creating
|
With current implementation, the following test code fails:
It fails because as of now cloud_firestore_mocks does not distinguish saved and unsaved documents.
I suspect code below should be updated to accommodate this.
getSubpath(root, path)
creates a document to the root.The text was updated successfully, but these errors were encountered: