Skip to content

Commit cedb8c3

Browse files
author
Brian Chen
authored
Update documentation to reflect emulator is default for integration tests. (#562)
1 parent 895fa7b commit cedb8c3

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

firebase-firestore/README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,33 @@ the source root.
4141
Make sure you have created a Firestore instance for your project, before
4242
you proceed.
4343

44-
### Run on Local Emulator
44+
By default, integration tests run against the Firestore emulator.
45+
46+
### Setting up the Firestore Emulator
47+
48+
The integration tests require that the Firestore emulator is running on port
49+
8080, which is default when running it via CLI.
50+
51+
* [Install the Firebase CLI](https://firebase.google.com/docs/cli/).
52+
```
53+
npm install -g firebase-tools
54+
```
55+
* [Install the Firestore
56+
emulator](https://firebase.google.com/docs/firestore/security/test-rules-emulator#install_the_emulator).
57+
```
58+
firebase setup:emulators:firestore
59+
```
60+
* Run the emulator
61+
```
62+
firebase serve --only firestore
63+
```
64+
* Select the `Firestore Integration Tests (Firestore Emulator)` run
65+
configuration to run all integration tests.
66+
67+
To run the integration tests against prod, select `FirestoreProdIntegrationTest`
68+
run configuration.
69+
70+
### Run on Local Android Emulator
4571
4672
Then simply run:
4773
```bash

0 commit comments

Comments
 (0)