fake_cloud_firestore
Previously known as cloud_firestore_mocks. Fake implementation of Cloud Firestore. Use this package to unit test apps that use Cloud Firestore.
4.2.0
219K downloads/mo
#817 most downloaded on pub.dev
atn832/fake_cloud_firestore
What this package is like to depend on
Last release 1 months ago
17 Jul 2026
Release timing varies
gaps range from 2 weeks to 9 months
Most releases are documented
notes for 44 of 52 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
52 releases · first in 2021
7 releases in the last 12 months
see the full history below
Release timeline
52 releases · May 2021 to Jul 2026Releases
latest 52-
4.2.017 Jul 2026Release notes
Open source →Upgraded MockWriteBatch's
update()signature to match cloud_firestore 6.7.1 (PR-339). Thank you jt274 and jamesdhutton! -
4.1.116 May 2026Release notes
Open source →Upgraded cloud_firestore_platform_interface to ^8.0.0 (PR-336). Thank you Wim-Hexagons!
-
4.1.025 Mar 2026Nothing published for this version
-
4.1.0+125 Mar 2026Release notes
Open source →Update
Transaction.updateandWriteBatch.updatesignatures for cloud_firestore 6.2.0 (PR-335). Thank you TonyDowney! -
4.0.211 Mar 2026Nothing published for this version
-
4.0.2+111 Mar 2026Release notes
Open source →Remove the dependency on package:quiver (switch from quiver's
hash2function to dart:core'sObject.hash) (PR-333). Thank you devoncarew! -
4.0.126 Dec 2025 -
4.0.031 Jul 2025 -
3.1.006 Nov 2024Release notes
Open source → -
3.0.317 Sep 2024Release notes
Open source → -
3.0.228 Jul 2024Release notes
Open source →- Support including multiple
docChangeswhen documents are added in parallel. Thank you KholmatovS! PR-312. - Support including multiple
docChangeswhen documents are modified or deleted in parallel. PR-314.
- Support including multiple
-
3.0.118 Jun 2024Release notes
Open source → -
3.0.005 Jun 2024 -
2.5.231 May 2024Release notes
Open source →Fixed broadcast of non converted snapshots when modifying a converted document. Thank you diegogarciar! PR-295.
-
2.5.119 Apr 2024 -
2.5.019 Apr 2024Nothing published for this version
-
2.4.931 Mar 2024Release notes
Open source →- Fixed composite key query on empty document. Thank you KholmatovS! PR-298.
- Fixed
documentReference.get()on empty document. PR-299.
-
2.4.814 Jan 2024Nothing published for this version
-
2.4.709 Jan 2024Release notes
Open source → -
2.4.604 Jan 2024Release notes
Open source → -
2.4.526 Dec 2023Release notes
Open source →- Fixed query snapshots to correctly fire and emit document changes (PR-284).
- Implemented limit to
arrayContainsAnyand fixed the limit towhereIn(PR-286). - Implemented
FakeFirebaseFirestore.clearPersistence()(PR-285).
Thank you KholmatovS for all 3 PRs!
-
2.4.423 Nov 2023 -
2.4.324 Oct 2023Release notes
Open source → -
2.4.219 Oct 2023Release notes
Open source →Upgraded rx to ^0.3.0 and cloud_firestore_platform_interface to ^6.0.1. PR-274
-
2.4.112 Mar 2023Nothing published for this version
-
2.4.1+112 Mar 2023 -
2.4.018 Feb 2023Release notes
Open source →Fixed API to support cloud_firestore 4.4.0:
- support Iterable in queries instead of List.
- support FieldPath on
DocumentReference.update.
Thank you sydneyagcaoili!
Also fixed deletion so that it reflects on
dump. Thank you ga-bri-el! -
2.3.010 Jan 2023Release notes
Open source →- Implemented checking Document access with Security Rules (PR-260).
- Fixed
DocumentReference.pathto always return a path without a starting '/' (commit c01eb23).
-
2.3.0+110 Jan 2023 -
2.3.0+210 Jan 2023Nothing published for this version
-
2.3.0+310 Jan 2023 -
2.2.003 Jan 2023 -
2.1.011 Dec 2022Release notes
Open source →- support
GetOptions.sourcewhen querying data. Thank you danReynolds! - fixed Exception code from
cloud_firestore/not-foundtonot-foundto match Firestore. Thank you Zambrella! - fixed comparison of
FieldValue.delete()andFieldValue.serverTimestamp()values. Thank you Zohenn! - fixed exception when ordering with null values. Thank you ming-chu!
- implemented
QuerySnapshot.metadata. Thank you agent3bood!
- support
-
2.0.120 Oct 2022 -
2.0.020 Oct 2022Nothing published for this version
-
2.0.0+120 Oct 2022Nothing published for this version
-
2.0.0+220 Oct 2022Release notes
Open source →- migrated to Firestore 4.0.0.
- implemented
Query.countfor collections (converted or not) and non-converted queries.
-
1.3.215 Oct 2022Release notes
Open source →- fixed the handling of maps in
FieldValue.arrayUnionandFieldValue.arrayRemove. - correctly throws an exception when attempting to save nested lists.
DocumentSnapshot.getcorrectly throws an exception when a value is not found.
Thank you Zohenn for all 3 fixes!
- fixed the handling of maps in
-
1.3.126 Aug 2022 -
1.3.031 Jul 2022Release notes
Open source →- added
maxAttemptstoFirebaseFirestore.runTransactionto match firestore 3.4.0. Thank you AndrewSheetMetal and OlegNovosad!
- added
-
1.2.401 Jul 2022Release notes
Open source →- made
Document.updatethrow an exception if trying to update a non-existent document.
- made
-
1.2.326 Jun 2022Release notes
Open source →- fixed an exception
Document.updatewhen replacing a non map value with a map value. Thank you Sapphirewhale! - support
whereNotIninQuery.where. Thank you KingOfDog! - fixed
orderBywhen used withstartAt,endAt. Thank you cedvdb!
- fixed an exception
-
1.2.220 Mar 2022Release notes
Open source →- support
FieldPathinDocumentSnapshot.get(). Thank you jpangburn! - make
notEqualToignore docs when the field does not exist. Thank you jpangburn! - implemented
endAtDocument,endBefore,endBeforeDocumentandstartAtDocumentinQuery. Thank you Andrew-Bekhiet! - make
DocumentReference.snapshots()emit the first event as soon as the stream is returned. Thank you Andrew-Bekhiet!
- support
-
1.2.118 Feb 2022Release notes
Open source →- fixed a regression where DocumentReference stopped firing an event when deleted.
- fixed a null pointer exception when getting a deleted document's snapshot with converter. Thank you cedvdb!
-
1.2.024 Nov 2021Release notes
Open source →- 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.323 Aug 2021Release notes
Open source →- 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.211 Jun 2021 -
1.1.106 Jun 2021Release notes
Open source →- 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.
- fixed a bug where the snapshot wouldn't fire if you got a
-
1.1.020 May 2021 -
1.0.220 May 2021Release notes
Open source →- fixed an exception when calling
snapshots()on both the raw and converted reference. - implemented
DocumentReference.setwhen usingwithConverter. - implemented
Query.firestore.
- fixed an exception when calling
-
1.0.119 May 2021Release notes
Open source →- implemented
withConverterforCollectionReference,DocumentReferenceandQuery.
- implemented
-
1.0.019 May 2021Release notes
Open source →Breaking change:
- renamed the library from cloud_firestore_mocks to fake_cloud_firestore
- renamed
MockFirestoreInstancetoFakeFirebaseFirestore.
Migration notes
In pubspec.yaml file, replace
cloud_firestore_mocks: ^0.9.0byfake_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();