You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I'm using version 2.16.2)
When I try to simulate an error on any save(Model.save()/Model.create()/doc.save()), the plain 'save' operation doesn't cover the Model.create(), but when I simulate it for both the 'save' and '$save' operations it works: const expectedError = new Error('Not supposed to save'); mockingoose(MyModel).toReturn(expectedError, '$save'); mockingoose(MyModel).toReturn(expectedError, 'save');
The text was updated successfully, but these errors were encountered:
(I'm using version 2.16.2)
When I try to simulate an error on any save(Model.save()/Model.create()/doc.save()), the plain 'save' operation doesn't cover the Model.create(), but when I simulate it for both the 'save' and '$save' operations it works:
const expectedError = new Error('Not supposed to save');
mockingoose(MyModel).toReturn(expectedError, '$save');
mockingoose(MyModel).toReturn(expectedError, 'save');
The text was updated successfully, but these errors were encountered: