Skip to content

Commit

Permalink
fix linter complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
IslandRhythms committed Feb 3, 2021
1 parent f1f2efc commit f79e9a7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/document.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9932,7 +9932,6 @@ describe('document', function() {
});
});
it('Makes sure pre remove hook is executed gh-9885', function() {
const tracker = new assert.CallTracker();
const SubSchema = new Schema({
myValue: {
type: String
Expand All @@ -9952,22 +9951,22 @@ describe('document', function() {
type: [SubSchema],
required: true
}
}, {minimize: false, collection: 'test'});
}, { minimize: false, collection: 'test' });

const Model = db.model('TestModel',thisSchema);
const Model = db.model('TestModel', thisSchema);

return co(function*() {
yield Model.deleteMany({}); // remove all existing documents
const newModel = {
foo: 'bar',
mySubdoc: [{myValue: 'some value'}]
mySubdoc: [{ myValue: 'some value' }]
};
const document = yield Model.create(newModel);
document.mySubdoc[0].remove();
yield document.save().catch((error) => {
console.error(error);
});
assert.equal(count,1);
assert.equal(count, 1);
});
});
});

0 comments on commit f79e9a7

Please sign in to comment.