title: Jest and Sinon: how do I stub an entire class?
body: <p>so I know in sinon you can go</p>
  
  <pre class="lang-js prettyprint-override"><code>sinon.stub(class.prototype, 'method').callsFake(() =&gt; {
    // ... some logic here ... 
  });
  </code></pre>
  
  <p>However, I need to stub the entire class, not just one method on it.  Ideally, I want to do something like:</p>
  
  <pre><code>sinon.stub(class.prototype, myClassObjectHere);
  </code></pre>
  
  <p>Is there a way to do this with Sinon? </p>
  
  <p>I appreciate your help and answer, but I know people are gonna ask why this needs to be done at all.  There is no other way.  The reason is this class.method I am stubbing does not always return the same value.  Base on what parameters was passed into the constructor... the stubbed method needs to call one of several other methods on the class.  And from my stubbed method, I do not have visibility onto those other methods.  Thanks for your help</p>