Skip to content

Commit

Permalink
test: fix tests re: #8075
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Aug 23, 2019
1 parent 57721e4 commit 314317e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6463,12 +6463,10 @@ describe('Model', function() {
it('options (gh-8075)', function() {
const Model = db.model('gh8075', new Schema({ name: String }));

return Model.create({ name: 'foo' }).
then(() => Model.exists({ $where: 'sleep(1000) || true' }, { maxTimeMS: 10 })).
then(
() => assert.ok(false),
err => assert.ok(err.message.includes('time limit'), err.message)
);
return Model.exists({}).
then(res => assert.ok(!res)).
then(() => Model.exists({}, { explain: true })).
then(res => assert.ok(res));
});
});
});

0 comments on commit 314317e

Please sign in to comment.