Skip to content

Commit

Permalink
test(types): add type tests for syncIndexes re #12100
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrahmanHafez committed Jul 13, 2022
1 parent e7c6de5 commit 2ac181b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/types/base.test.ts
Expand Up @@ -46,3 +46,8 @@ function gh11478() {
function gh10139() {
mongoose.set('timestamps.createdAt.immutable', false);
}

function gh12100() {
mongoose.syncIndexes({ continueOnError: true, noResponse: true });
mongoose.syncIndexes({ continueOnError: false, noResponse: true });
}
9 changes: 9 additions & 0 deletions test/types/models.test.ts
Expand Up @@ -319,3 +319,12 @@ function gh11911() {
update: changes
});
}

function gh12100() {
const schema = new Schema();

const Model = model('Model', schema);

Model.syncIndexes({ continueOnError: true, noResponse: true });
Model.syncIndexes({ continueOnError: false, noResponse: true });
}

0 comments on commit 2ac181b

Please sign in to comment.