I have a component that emit a value when call to a function, how can I test if the @output emit a value ? this is my function
@Output() emitDetail = new EventEmitter();
emitDetailFn() {
this.emitDetail .emit(false);
}
and this is my test
it('Detailfn should be called',()=>{
let emitted: boolean;
component.emitDetail .subscribe(value => {
emitted = value
})
component.emitDetailFn();
expect(emitted).toEqual(false)
})