[docs] Mocking of angularfire methods with angularfire 7 during tests
- Langage dominant
- TypeScript
- Étoiles
- 7.8k
- Forks
- 2.2k
- Merge moyen
- 22 h 28 min
- PR mergées (30 j)
- 6
Description
### Version info
**Angular:** 12
**Firebase:** 9
**AngularFire:** 7
### How to reproduce these conditions
How to mock firebase operator during tests suits ?
How to write unit tests with mocks of firestore/auth/analytics methods ?
### Expected behavior
With Angularfire 6, I was able to mock angularfire methods like doc, collection and other methods to write my unit tests.
I would like to be able to mock it.
### Actual behavior
I am getting the error during my unit tests :
Error: Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la configuration des tests d’AngularFire 7 autour de AngularFireModule et provideFirebaseApp, puis reproduisez l’erreur de test unitaire signalée en mockant les méthodes de Firestore, Auth et Analytics. La tâche est terminée lorsqu’une procédure fonctionnelle pour mocker ces méthodes d’AngularFire avec Angular 12, Firebase 9 et AngularFire 7 est documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, firebase, typescript
- Domaine
- documentation, testing
- Type d'issue
- Documentation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100