Skip to content

Commit

Permalink
Corrects README for React Native (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinferrari authored Apr 13, 2023
1 parent 5df7167 commit 0acf158
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand All @@ -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');
});
});
```
Expand Down

0 comments on commit 0acf158

Please sign in to comment.