Skip to content

Commit

Permalink
chore: now working on 5.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jan 17, 2019
1 parent 9a546b1 commit 0348984
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "mongoose",
"description": "Mongoose MongoDB ODM",
"version": "5.4.4",
"version": "5.4.5-pre",
"author": "Guillermo Rauch <guillermo@learnboost.com>",
"keywords": [
"mongodb",
Expand Down
10 changes: 10 additions & 0 deletions test/query.test.js
Expand Up @@ -3013,6 +3013,16 @@ describe('Query', function() {
assert.equal(docs.length, 1);
});
});

it('throws DocumentNotFoundError by default (gh-7409)', function() {
return co(function*() {
const err = yield Model.findOne({ name: 'na' }).
orFail().
then(() => null, err => err);
assert.equal(err.name, 'DocumentNotFoundError', err.stack);
assert.deepEqual(err.filter, { name: 'na' });
});
});
});

describe('getPopulatedPaths', function() {
Expand Down

0 comments on commit 0348984

Please sign in to comment.