Skip to content
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

support metadata changes #253

Merged
merged 4 commits into from Dec 11, 2022
Merged

support metadata changes #253

merged 4 commits into from Dec 11, 2022

Conversation

danReynolds
Copy link
Contributor

@danReynolds danReynolds commented Nov 26, 2022

Adds support for specifying metadata changes coming from the cache or not like the cloud_firestore API supports.

@atn832
Copy link
Owner

atn832 commented Nov 29, 2022

Thanks for putting in all that work @danReynolds. Before I review the PR, would you mind writing unit tests to test all the new changes you've made? This helps with the review because it shows how it's used, and also ensures that no one accidentally breaks your code in the future.

@danReynolds
Copy link
Contributor Author

Yep! Added some @atn832 thanks. Let me know if there's anything else you need.

@@ -26,7 +26,10 @@ class FakeConvertedQuery<T extends Object?> extends FakeQueryWithParent<T> {
toFirestore: _converter.toFirestore)
.get())
.toList();
return MockQuerySnapshot(await Future.wait(convertedSnapshots));
return MockQuerySnapshot(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice of you to remember the case of converted queries as well.

@atn832
Copy link
Owner

atn832 commented Dec 11, 2022

The tests really helped me navigate your PR. Thanks!

@atn832 atn832 merged commit 3f9c6f7 into atn832:master Dec 11, 2022
@atn832
Copy link
Owner

atn832 commented Dec 11, 2022

Just published your feature to https://pub.dev/packages/fake_cloud_firestore/changelog#210.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants