Relative Content

Tag Archive for angularunit-testingjasmineangularfire

Angular Unit Test – help spying on angularfire arrayUnion and arrayRemove

I have two similar functions to create/remove items in an array, and the unit tests are blowing up once I hit the arrayUnion and arrayRemove functions from firestore. The error seems to indicate that I’m skipping my mock providers and trying to use the real thing. Unfortunately I can’t figure out what I need to mock to intercept the arrayUnion and arrayRemove calls so they don’t cause the error below.