title: How to mock a method in the same class I'm testing in nestjs/jest
body: <p>I have a service in NestJS I'm testing using <code>@nestjs/testing</code> in Typescript. But one of the methods depends on another, I would like to mock out the dependent method for only one test, so I can't use the ES6 class mocking, as that would override the class I'm testing with a mock.</p>
  <pre class="lang-js prettyprint-override"><code>class UsersService {
    findMany(ids) {
      return ids.map(id =&gt; this.findOne(id));
    }
    
    findOne(id) {
      return this.httpService.get(id);
    }
  }
  </code></pre>
  <p>I want to test both methods, but I want to mock <code>findOne</code> only when I'm testing <code>findMany</code>.<br />
  Thanks in advance.</p>