title: Karma: property does not have access type get
body: <p>I have an error in my Karma tests in my Angular application. The error is when I run my tests:</p>
  <p><code>Failed: Property activePropertyChanged does not have access type get</code></p>
  <p>I'm trying to mock a service called <code>ModuleSpecService</code>. In this service there's the following getter:</p>
  <pre class="lang-js prettyprint-override"><code>get activePropertyChanged(): Observable&lt;SpecificationPropertyObject&gt; {
      return this.activePropChangedSubject.asObservable();
  }
  </code></pre>
  <p>And in my <code>spec</code> file I mock it like this:</p>
  <pre class="lang-js prettyprint-override"><code>spyOnProperty(moduleSpecServiceMock, 'activePropertyChanged', 'get').and.returnValue(of());
  
  // then, in configureTestingModule() I define/mock the service like this:
  providers: [{ provide: ModuleSpecService, useValue: moduleSpecServiceMock }]
  </code></pre>
  <p>So there's clearly a getter in my service which I want to mock. If I remove the line with <code>spyOnProperty()</code> it throws the following error:</p>
  <p><code>TypeError: this.moduleSpecService.activePropertyChanged.subscribe is not a function</code></p>
  <p>so I definitely need the mock.</p>
  <p>Any idea what could go wrong?</p>