title: How to get Jasmine's spyOnProperty to work?
body: <p>I saw <a href="https://stackoverflow.com/questions/33148496/how-can-i-spy-on-a-getter-property-using-jasmine/43793646#43793646">this post</a> post and was excited to try it out, but I'm unable to get it working. Trying to keep this simple just to figure out what's wrong, but even this is failing.</p>
  
  <pre><code>export class SomeService {
  ...
  private _myValue: Boolean = false;
  get myValue(): Boolean {
      return this._myValue;
  }
  set myValue(helper: Boolean) {
      this._myValue = helper;
  }
  </code></pre>
  
  <p>And in my unit test, I have:</p>
  
  <pre><code> it('should ', inject([SomeService], (someService: SomeService) =&gt; {         
      let oldValue = someService.myValue;    
      expect(oldValue).toBe(false); // passes, clearly we can use our getter
      someService.myValue = true;    
      expect(someService.myValue).toBe(true); // passed, clearly the setter worked
  
      spyOnProperty(someService, 'myValue', 'getter').and.returnValue(false); // Property myValue does not have access type getter
  
      //spyOnProperty(someService, 'myValue', 'get').and.returnValue(false);same error if tried this way
  
      expect(someService.myValue).toBe(false);
   }));
  </code></pre>
  
  <p>I put the values up top to clearly show I can get and set the value. That has no problems. Wallaby shows ReferenceError: spyOnProperty is not defined on the spyOnProperty line. I'm not sure if that helps, but the errors I put above were what karma gives me when I run those tests. </p>
  
  <p>Anyone who has gotten this to work, I'd greatly appreciate the assistance. Apologies for any typos, I've been staring at this for most of the day. </p>