Member-only story
Angular, Jest, Firebase, and ReyRey!
I’ve written several posts in the past using Firebase and the AngularFire2 library. The AngularFire2 library makes using and integrating Firebase with your Angular applications super fun and easy.
AngularFire2 also enables you to build JAMStack applications which only require a frontend and calls to the various Firebase services (Auth, Database, etc.). After following the docs on the AngularFire2 README, you can get up and running fairly easily. From there its just a matter of injecting the different services into your Angular Components.
I recently built an Angular application that uses AngularFire2. The application also uses Jest for unit testing. I learned some in the process of building it and wanted to share for future reference.
This post is going to cover my app and some basics about setting up Jest. I’m not going to cover the initial setup of AngularFire2 since their GitHub repo covers it. I’m also not going to go over a lot about integrating Jest with Angular, except to say that I’m using an Angular Builder for Jest in lieu of Karma. Builders are great since they let you leverage the Angular CLI. I’ll cover briefly more on those and using Jest in the first section.