@firestore-emulator/server
v0.2.8
Published
This package is the implementation of the Firestore emulator. It is a Node.js
Downloads
479
Maintainers
Readme
@firestore-emulator/server
This package is the implementation of the Firestore emulator. It is a Node.js
Installation
npm install @firestore-emulator/server
Usage
import { FirestoreServer } from '@firestore-emulator/server'
const server = new FirestoreServer()
await server.start(8080)
// now you can connect to the emulator at localhost:8080
API
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()