williamkapke / mongo-mock

Let's pretend we have a real MongoDB
MIT License
240 stars 75 forks source link

Allow update without upsert when no docs match #121

Closed TanukiSharp closed 4 years ago

TanukiSharp commented 4 years ago

I added a unit test that indeed fails without the fix, Since I'm not sure how to check against null with mocha, I simply used an inequality and an throw.

Closes #107

Note that this may also close issue 108 (#108) as it seems to be a duplicate.

TanukiSharp commented 4 years ago

I'm not sure how to check against null with mocha

I just fixed that.