Skip to content

Test against Firebase as it behaves in production

Fireemu is a local emulator for Cloud Firestore, Authentication, Cloud Storage, Cloud Functions, Pub/Sub, and Eventarc. It mirrors production Firebase behavior, so a test that passes locally or in CI gives you confidence in how your app will behave after deployment.

Node.js 20 or newer is required. Fireemu is published on npm as fireemu.

Terminal window
npm install --save-dev fireemu
npx fireemu init
# Run your tests against the emulators, then stop them
npx fireemu exec -- npm test

fireemu exec starts the emulators, sets the Firebase SDK emulator environment variables for your command, and exits with its status. fireemu up keeps them running with the Emulator UI at http://127.0.0.1:4000.

Fewer surprises after you deploy

The official emulator runs a query even when its composite index is missing, so the error first appears in production. Under the recommended strict profile, Fireemu checks every query against your firestore.indexes.json and rejects queries missing an index, returning production-exact errors and a link to create the required index.

Production behavior, without the setup

The recommended strict profile behaves like production. The few places where matching production would only add setup to a test, such as signed tokens or an Admin API call to turn a feature on, are documented development defaults, and each can be switched with its own setting. See the list.

Features the official emulator lacks

Includes TOTP multi-factor authentication, a local App Check implementation with debug tokens, and, under strict, the beforeEmailSent blocking function—none of which are supported by the official emulator.

Control over time

Start at any point in time and advance a virtual clock. Scheduled functions run when the clock reaches them, so you can test a nightly job without waiting for night.

Verified against real Firebase

Behavior is compared with recordings from real Firebase projects. 21 areas, from Firestore transactions to Storage Security Rules, are verified against production: every condition matches the recordings or is a reviewed and documented difference.

Explains denials

While production responds to Security Rules denials with a generic error message, Fireemu also prints which allow conditions were evaluated and their individual results.

Fast and light

A single native binary. In project benchmarks, it started 21.6x faster than the official Firestore emulator and used about 1/34th of its idle memory (one benchmark run, emulator profile; see Performance).

Product Fireemu
Cloud Firestore Supported, including Security Rules
Firebase Authentication (Identity Platform) Supported, including TOTP MFA, multi-tenancy and blocking functions
Cloud Storage for Firebase Supported, including Security Rules
Cloud Functions for Firebase Supported: HTTP, callable, event, scheduled, task queue and blocking functions
Cloud Pub/Sub, Eventarc, Cloud Tasks Supported
Firebase App Check Local implementation with debug tokens
Firebase Realtime Database Partially supported: served with Security Rules, export and import, and compared with the official emulator; no Functions triggers yet
Firebase Hosting, App Hosting, Data Connect Deferred (not yet supported)
Firebase Extensions Not planned

See the compatibility tables for each product, the production verification status of each area, and the capability manifest.