We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2f189c commit e00c561Copy full SHA for e00c561
test/query.test.js
@@ -3947,7 +3947,6 @@ describe('Query', function() {
3947
});
3948
3949
it('should return query helper supplied in schema options query property instead of undefined', function(done) {
3950
-
3951
const Model = db.model('Test', new Schema({
3952
userName: {
3953
type: String,
@@ -3962,7 +3961,9 @@ describe('Query', function() {
3962
3961
}));
3963
3964
Model.create({ userName: 'test' }, function(error) {
3965
- assert.ifError(error);
+ if (error instanceof Error) {
+ return done(error);
3966
+ }
3967
Model.find().byUserName('test').exec(function(error, docs) {
3968
if (error instanceof Error) {
3969
return done(error);
0 commit comments