Hi there,
I just want to simply inject another service while testing. I extend a mock
service from original service.
1) It is not working (event if I set param to null)
2) I would like to get the original injected param in the mock service as
well
My Code looks like this:
inject([AngularFireAuth], (injectService: AngularFireAuth) => {
TestBed.overrideProvider( AuthService, {useValue:
MockAuthService(injectService) });
TestBed.configureTestingModule({
declarations: [ LoginComponent ],
providers: [ AuthService ]
}).compileComponents();
});
The problem here is that the line 2 is never reached. If I move it out and seht
param to null, I get an error.
Is this correct what I am doing?
Thx a lot,
Nikolaus
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.