diff --git a/test/model.test.js b/test/model.test.js index c9146cfb875..62012d83262 100644 --- a/test/model.test.js +++ b/test/model.test.js @@ -4773,6 +4773,11 @@ describe('Model', function() { }); }); + it('returns empty array if no documents (gh-8130)', function() { + const Movie = db.model('gh8130', Schema({ name: String })); + return Movie.insertMany([]).then(docs => assert.deepEqual(docs, [])); + }); + it('insertMany() multi validation error with ordered false (gh-5337)', function(done) { const schema = new Schema({ name: { type: String, required: true }