6

I am receiving a warning when running Jest with firebase emulators

The warning

{"severity":"WARNING","message":"Warning, estimating Firebase Config based on GCLOUD_PROJECT. Initializing firebase-admin may fail"}

My test case

describe('Functions', () => {
  const testEnv = functions()

  let firestore: admin.firestore.Firestore

  beforeAll(() => {
    const projectId = 'sample'

    process.env.GCLOUD_PROJECT = projectId
    process.env.FIRESTORE_EMULATOR_HOST = 'localhost:8080'
    admin.initializeApp({ projectId })

    firestore = admin.firestore()
  })

  afterAll(() => {})
})
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Rodrigo
  • 135
  • 4
  • 45
  • 107

0 Answers0