Use the Firestore emulator to unit test security rules.
Learn how to write unit testing RxJS Observables using Jest
Apply test-driven development to your Firebase Cloud Functions with Jest