From 0acf1581a8e9e00411b443a90cc0a0cc58029cf6 Mon Sep 17 00:00:00 2001 From: Agustin Ferrari <40501091+agustinferrari@users.noreply.github.com> Date: Thu, 13 Apr 2023 20:05:09 -0300 Subject: [PATCH] Corrects README for React Native (#164) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b4147b0..3b5862c 100644 --- a/README.md +++ b/README.md @@ -161,12 +161,12 @@ The `Auth` module is not available for `@google-cloud/firestore` compatibility._ ### `@react-native-firebase/firestore` compatibility -If you use `@react-native-firebase/firestore`, use `mockGoogleCloudFirestore` instead of `mockFirebase` in all the documentation. +If you use `@react-native-firebase/firestore`, use `mockReactNativeFirestore` instead of `mockFirebase` in all the documentation. ```js -const { mockGoogleCloudFirestore } = require('firestore-jest-mock'); +const { mockReactNativeFirestore } = require('firestore-jest-mock'); -mockGoogleCloudFirestore({ +mockReactNativeFirestore({ database: { users: [ { id: 'abc123', name: 'Homer Simpson' }, @@ -187,7 +187,7 @@ test('testing stuff', () => { .get() .then(userDocs => { expect(mockCollection).toHaveBeenCalledWith('users'); - expect(userDocs[0].name).toEqual('Homer Simpson'); + expect(userDocs.docs[0].data().name).toEqual('Homer Simpson'); }); }); ```