Skip to content

Commit

Permalink
test: fix tests re: #8073
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Aug 18, 2019
1 parent 20fa775 commit 5c2fbc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const applyWriteConcern = require('./helpers/schema/applyWriteConcern');
const assignVals = require('./helpers/populate/assignVals');
const castBulkWrite = require('./helpers/model/castBulkWrite');
const discriminator = require('./helpers/model/discriminator');
const each = require('./helpers/each');
const getDiscriminatorByValue = require('./queryhelpers').getDiscriminatorByValue;
const getModelsMapForPopulate = require('./helpers/populate/getModelsMapForPopulate');
const immediate = require('./helpers/immediate');
Expand Down Expand Up @@ -3381,7 +3382,7 @@ Model.bulkWrite = function(ops, options, callback) {
const validations = ops.map(op => castBulkWrite(this, op, options));

return utils.promiseOrCallback(callback, cb => {
parallel(validations, error => {
each(validations, (fn, cb) => fn(cb), error => {
if (error) {
return cb(error);
}
Expand Down

0 comments on commit 5c2fbc5

Please sign in to comment.