Relative Content

Tag Archive for angulartypescriptunit-testingjasmine

Angular Unit Test – Mocking a function on a property

I’m trying to mock/test SendVerificationMail() from my AuthService, which starts by calling the AngularFireAuth method currentUser which returns an angularFire User object, which you can then use to call sendEmailVerification(). I’ve tried a few different mocking methods, but I just end up with the errors below because it can’t find user.sendEmailVerification

Angular Component Testing

I am trying to mock **VrskModalService **used in this component. But I am failing to mock it by providing in TestBed.configureTestingModule providers. In this component, I noticed VrskModalService is provided in its decorator not through module.
Component to test