diff --git a/test/model.test.js b/test/model.test.js index ce334a0c910..c9146cfb875 100644 --- a/test/model.test.js +++ b/test/model.test.js @@ -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)); }); }); });