2

I am new to jasmine karma test cases, when I called the openMail method from spec file it shows this.$modal.modal is not a function errors. can anyone help me to solve this issues

MY spec file

it('should call openMail ', () => {
    component.openMail();
    spyOn(component, 'openMail');
    expect(component.openMail).toBeTruthy();
  });

component.ts file

 @ViewChild('addmail')
  AddMailModel: ModalComponent;

 openMail() {
    this.data.mail = '';
    this.AddMailModel.open();
  }
RamKumar
  • 126
  • 1
  • 10

0 Answers0