Skip to main content
Some services already ship an official local emulator that their SDKs know how to reach. Baseline does not reimplement those. Run the vendor’s emulator next to Baseline instead: you get the vendor’s own fidelity, and Baseline covers the services that have no local option. Google Cloud Storage has no official emulator, so it is on Baseline’s own roadmap. For gRPC services in general, see WebSockets.

Firebase

The Emulator Suite needs the Firebase CLI and a Java runtime (see Firebase’s install guide for the minimum JDK version). Initialize the emulators you want once:
Then point the Admin SDK at them. The Admin SDK reads these variables and skips real credentials when they are set:
A project id starting with demo- tells the Firebase tools that no real project exists, so nothing can reach production. In the browser SDK, call connectAuthEmulator, connectFirestoreEmulator, and connectStorageEmulator instead.

Azure Blob Storage

Azurite is an npm package, so it needs nothing but Node:
Blob storage listens on port 10000 (queues on 10001, tables on 10002). @azure/storage-blob connects with the well known development connection string:

Google Cloud Pub/Sub

The Pub/Sub emulator ships with the gcloud CLI (gcloud components install pubsub-emulator) and also needs Java:
@google-cloud/pubsub connects to it when PUBSUB_EMULATOR_HOST is set:
The emulator keeps topics and subscriptions in memory only, so create them at the start of each test run.

Running them together

Start everything from one package.json script with concurrently. Baseline serves the providers in baseline.config.json, and each official emulator serves its own:
baseline.config.json
Keep the variables in one .env.test so your app sees Baseline’s URLs and the official emulators’ hosts together:
Baseline’s --state and snapshots cover Baseline’s services only. The Firebase Emulator Suite has its own --import and --export-on-exit, and Azurite keeps its data in the --location folder.