Skip to content

Commit

Permalink
Refactor test in query.test.js file.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad0-0ahmad committed Apr 15, 2022
1 parent db8469c commit d3e3b2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/query.test.js
Expand Up @@ -3947,7 +3947,6 @@ describe('Query', function() {
});

it('should return query helper supplied in schema options query property instead of undefined', function(done) {

const Model = db.model('Test', new Schema({
userName: {
type: String,
Expand All @@ -3962,7 +3961,9 @@ describe('Query', function() {
}));

Model.create({ userName: 'test' }, function(error) {
assert.ifError(error);
if (error instanceof Error) {
return done(error);
}
Model.find().byUserName('test').exec(function(error, docs) {
if (error instanceof Error) {
return done(error);
Expand Down

0 comments on commit d3e3b2f

Please sign in to comment.