fake_cloud_firestore 1.2.0 fake_cloud_firestore: ^1.2.0 copied to clipboard
Previously known as cloud_firestore_mocks. Fake implementation of Cloud Firestore. Use this package to unit test apps that use Cloud Firestore.
1.2.0 #
- migrated to Firestore 3.0.0. Thank you mboyamike!
- fixed a null pointer exception when deleting a document using a converter. Thank you wesleyfuchter!
- fixed a null pointer exception when using isGreaterThan and the likes on null values. Thank you fkoch-tgm!
1.1.3 #
- support Converters for startAt/startAfter/endAt queries.
- fixed a bug where a collection would not fire a snapshot if one of its documents was modified if it was in a sub-collection instead of the root.
- fire an exception when a batch contains more than 500 updates. Thank you YuKiO-output!
1.1.2 #
- implemented
Query.startAfter
.
1.1.1 #
- fixed a bug where the snapshot wouldn't fire if you got a
Query.snapshot
, then started listening to it after. - fixed a bug where the snapshot wouldn't fire on an empty collection.
1.1.0 #
- migrated to Firestore 2.2.0.
1.0.2 #
- fixed an exception when calling
snapshots()
on both the raw and converted reference. - implemented
DocumentReference.set
when usingwithConverter
. - implemented
Query.firestore
.
1.0.1 #
- implemented
withConverter
forCollectionReference
,DocumentReference
andQuery
.
1.0.0 #
Breaking change:
- renamed the library from cloud_firestore_mocks to fake_cloud_firestore
- renamed
MockFirestoreInstance
toFakeFirebaseFirestore
.
Migration notes #
In pubspec.yaml file, replace cloud_firestore_mocks: ^0.9.0
by fake_cloud_firestore: ^1.0.0
.
Then in tests, replace:
import 'package:cloud_firestore_mocks/cloud_firestore_mocks.dart';
final firestore = MockFirestoreInstance();
By:
import 'package:fake_cloud_firestore/fake_cloud_firestore.dart';
final firestore = FakeFirebaseFirestore();
0.9.0 #
- migrated to Firestore 2.1.0.
- documented a compatibility table.
0.8.4 #
- implemented
DocumentSnapshot.[]
to read a field.
0.8.3+1 #
- fixed compile error.
0.8.3 #
- migrated to sound null safety.
- implemented
Query.startAt
,Query.endAt
for exact matches. Thank you maxluchterhand1! - implemented
Query.limitToLast
. Thank you maxluchterhand1! - fixed a null pointer exception when query using
Query.where
with composite keys, on documents that didn't have the key. Thank you ming-chu! - support
isNotEqualTo
andisNull
forQuery.where
. Thank you alxflam! - implemented
QuerySnapshot.size
. - removed dependency to Mockito.
0.8.1 #
- fixed
QueryDocumentSnapshot.data
's signature change introduced in firestore 1.0.4. Thank you lyledean1!
0.6.0 #
- migrated to Firestore 0.16.0.
0.5.2+1 #
- restored release notes for 0.4.7.
0.5.2 #
- fix null exception when using
collectionGroup
on documents with no value. Thank you rhisiart-cufflink!
0.5.1 #
- make
MockDocumentReference.snapshots()
fire on updates. Thank you gabeschine!
0.5.0+1 #
- fixed an issue with
runTransaction
. Thank you sensuikan1973!
0.5.0 #
Support the breaking changes of Firestore 0.14.0. Thank you for the great update sensuikan1973!
0.4.7 #
- support collection groups (
instance.collectionGroup
). Thank you sensuikan1973! - fixed collections so they can contain a subcollection and a document with the same ID. Thank you dumbbell!
0.4.6+1 #
- downgraded dependency to collection to satisfy flutter_driver requirements.
0.4.6 #
- support
FieldPath.documentId
inQuery.where
andorderBy
. Thank you nukotsuka! - continuously send notifications on queries, even for updates and deletions. Thank you gki!
- in
DocumentChange
, populateoldIndex
andnewIndex
. Thank you sensuikan1973! - implemented
QuerySnapshot.documentChanges
. Thank you feroult!
0.4.5 #
- support
FieldValue
and keys containing dots inCollectionReference.add
. Thank you nxcco! - DocumentSnapshots are made with a deep copy of the data. Thank you amatveyakin!
- support
FieldValue
andDateTime
in nested objects. - support null values in
Query.orderBy
. - updated the documentation on integration tests.
0.4.4 #
- support
whereIn
inCollectionReference.where
. DocumentSnapshot.data
now returns a deep copy.
Thank you anuragbhd for both improvements!
0.4.3+1 #
- updated docs.
0.4.3 #
- support
Query.startAfterDocument
. Thank you Hadii1! - support
arrayContains
inCollectionReference.where
. Thank you qwales1! - support
arrayContainsAny
inCollectionReference.where
. Thank you anuragbhd! - support document paths with slashes. Thank you suztomo!
- support Document and Collection's
parent
,path
,firebase
, andequals
methods. Thank you suztomo!
0.4.2 #
New features:
- support
Firestore.runTransaction
. - support
FieldValue.increment
,arrayUnion
, andarrayRemove
.
Adhering to Firebase specs:
Firestore.document
andcollection
check the number of segments.Query
executes only when callinggetDocuments
.- Updating a document doesn't affect previous
Snapshots
. - saves a deep copy when when saving data to a document.
- checks that data types are valid upon saving data.
All credits go to suztomo. Thank you!
0.4.1 #
CollectionReference.getDocuments
returns only documents that have been saved byCollectionReference.add
orDocumentReference.setData
orDocumentReference.updateData
.- make
CollectionReference.add
generate a randomdocumentId
. - support batch operations
updateData
anddelete
. - implemented
DocumentReference.path
. - implemented
DocumentSnapshot.reference
.
Thank you suztomo for contributing these improvements!
0.4.0+1 #
- fixed some lint error.
0.4.0 #
- support
CollectionReference.document()
. Thanks suztomo! - support nested documents. Thanks suztomo!
- support
FieldValue.serverTimestamp()
. Thanks suztomo! - breaking change: remove requirement to call
setupFieldValueFactory()
. They are now initialized automatically whenMockFirestoreInstance
is instantiated.
0.3.1 #
- support
FieldValue.delete()
again.
0.3.0 #
- fixed breakage due to
FieldValue.type
andFieldValue.value
being removed from the public API at cloud_firestore 0.10.0. - implemented chainable
Query.where
. Thank you qwales1! - dropped support for
FieldValue.delete()
.
0.2.6 #
- implemented
MockDocumentReference.snapshots()
. Thank you dfdgsdfg and terry960302!
0.2.5 #
- upgraded cloud_firestore to ^0.13.0+1.
0.2.4 #
- cleaned up the public documentation to expose only
MockFirestoreInstance
.
0.2.3 #
- fixed code health related issues.
0.2.2 #
- added support for
isGreaterThanOrEqualTo
,isLessThan
,isLessThanOrEqualTo
inCollectionReference.where
. - implemented mock
DocumentReference.delete
.
0.2.1 #
- Fixed snapshots not firing several times.
- Implemented example unit tests based on Firestore's own example project.
0.2.0 #
- Initial version.