karma jasmine - Testing a public method that calls subscribe on private property angular -
i'm in process of learning angular 2 , working on unit tests app. have service that's similar following:
@injectable() export class modalservice{ private onclose = new subject<boolean>(); public subscribeonmodalclose(closehandler:any):void { this.onclose.subscribe(closehandler); } } i'm not sure how should go testing subscribeonmodalclose(). i'm thinking should make sure .subscribe() gets called when actual method gets called. i'm not sure how check that, considering onclose$ private property.
any appreciated.
Comments
Post a Comment