-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Summary
Would prefer import admin from 'firebase-admin' syntax instead of require('firebase-admin')
Relevant information
Including sdk with require('firebase-admin') syntax seems mandatory (regarding docs, sample and my own experience) to make firestore mock work.
Otherwise, the firestore mock is not initialised properly and the tests crash at the first collection call.
As moderns Typescript coders, my team and I would prefer a proper import admin from 'firebase-admin') style of include.
Is there a way to initialize the test, mocks etc properly without that ugly require thing ?
Even adding a jest.mock(admin.firestore...) or something would be more acceptable to us.
You guys did a great job, by the way ;-)
Environment (if relevant)
I can provide test sample if needed, but i gess my question is quite self explanatory.