This package lets you run a real firebase-admin Firestore instance entirely in-process against an in‑memory database with high-fidelity production Firestore semantics (CRUD, batches, transactions, queries, aggregations, vector values, listeners, etc):
https://www.npmjs.com/package/@firebase-bridge/firestore-admin
The companion package allows you to register all Firestore triggers your production app exports, and drive them by performing writes against the mock database:
https://www.npmjs.com/package/@firebase-bridge/firestore-functions