Não estou conseguindo passar essa linha de teste, porque o retorno dele esta esperando outra função.Segue o erro abaixo:
TypeError: no se pueden leer las propiedades de undefined (leyendo 'createRequest')
TsFile findById(id: string){ let parameters: JavaConnectorParameters = new JavaConnectorParameters(); parameters.addParam('id', id); return this.javaConnector.createRequest(RestMethod.GET, this.restMapping, '/find-by-id', parameters); } specFile it('should call the service', () => { service.findById('id'); spyOn(ProgressCheckListAPI.prototype, "findById").and.callThrough(); ProgressCheckListAPI.prototype.findById('id'); expect(service.findById).toHaveBeenCalled(); });