Skip to content

Commit

Permalink
test(model): repro #8343
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Nov 18, 2019
1 parent 3e9faef commit 4c150e0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/model.indexes.test.js
Expand Up @@ -104,12 +104,15 @@ describe('model', function() {
});
});

it('of embedded documents unless excludeIndexes (gh-5575)', function(done) {
const BlogPost = new Schema({
_id: {type: ObjectId},
title: {type: String, index: true},
it('of embedded documents unless excludeIndexes (gh-5575) (gh-8343)', function(done) {
const BlogPost = Schema({
_id: { type: ObjectId },
title: { type: String, index: true },
desc: String
});
const otherSchema = Schema({
name: { type: String, index: true }
}, { excludeIndexes: true })

const User = new Schema({
name: {type: String, index: true},
Expand All @@ -121,7 +124,8 @@ describe('model', function() {
blogpost: {
type: BlogPost,
excludeIndexes: true
}
},
otherArr: [otherSchema]
});

const UserModel = db.model('gh5575', User);
Expand Down

0 comments on commit 4c150e0

Please sign in to comment.