Package Exports
- @firestore-emulator/server
- @firestore-emulator/server/dist/cjs/index.js
- @firestore-emulator/server/dist/esm/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@firestore-emulator/server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@firestore-emulator/server
This package is the implementation of the Firestore emulator. It is a Node.js
Installation
npm install @firestore-emulator/serverUsage
import { FirestoreServer } from '@firestore-emulator/server'
const server = new FirestoreServer()
await server.start(8080)
// now you can connect to the emulator at localhost:8080API
FirestoreServer
state
The current state of the emulator.
see below: FirestoreState
FirestoreState
toJSON()
emits a JSON representation of the state.
for example, you can use the firestore data for snapshot testing:
expect(server.state.toJSON()).toMatchSnapshot()