I am trying to write a Unit Test for Component which has Dependency Service which contains EventEmitter. I have subscribed to this Event Emitter in this Component. How can I mock this?
Dependent Service :
Service A {
testEmitter : EventEmitter<any>();
}
Component has function :
funcA() {
service.testEmitter.subscribe()....//
}
How can I mock this subscription? This function is called during Initialization So the Test won't work