title: Sinon stub mongoose save to resolve the object which called save
body: <p>I have the following code:</p>
  
  <pre><code>const newImage = new Image(...);
  newImage.save().then(image =&gt; {...})
  </code></pre>
  
  <p>Is there a way to stub the save method for Image to resolve the object which called it? ie. I want <code>image</code> in the <code>then</code> clause to just be the same as <code>newImage</code></p>
  
  <p>Something like
  <code>sinon.stub(Image.prototype, 'save').resolves(theCallingObject);</code></p>
  
  <p>Is this possible? Any help is appreciated.
  Thanks!</p>