Overview
A fake implementation of Cloud Firestore designed for unit testing Flutter applications. It mimics the behavior of the real Cloud Firestore service, allowing developers to test their app's data logic without requiring an actual Firebase backend. This package is ideal for isolating tests and ensuring consistent, repeatable results during development. Originally known as cloud_firestore_mocks, it supports all major platforms including Android, iOS, Web, macOS, and Windows.
Use cases
- Unit testing Firestore-dependent logic
- Testing app state without a live Firebase connection
- Isolating components during integration tests
- Simulating different Firestore responses in tests
- Validating data handling before deployment
Key features
- Full compatibility with Cloud Firestore API
- Supports all major Flutter platforms
- Easy setup for test environments
- Mocked document and collection operations
- No need for Firebase project configuration
Suitable for
- Flutter developers writing unit tests
- Teams prioritizing test reliability
- Projects with complex Firestore interactions
- Developers avoiding real Firebase costs in tests
- Apps requiring deterministic test outcomes
Considerations
- Not suitable for end-to-end testing
- Does not replicate real-time sync behavior
- Limited to testing client-side logic
- Requires manual setup of initial data
- May not reflect all edge cases of real Firestore