Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jun 17, 2024
1 parent 2991d7b commit 20d1500
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/document.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ describe('toObject()', function() {

beforeEach(function() {
Stub = function() {
const schema = this.$__schema = {
this.$__schema = {
options: { toObject: { minimize: false, virtuals: true } },
virtuals: { virtual: 'test' }
virtuals: { virtual: { applyGetters: () => 'test' } }
};
this._doc = { empty: {} };
this.get = function(path) { return schema.virtuals[path]; };
this.$__ = {};
};
Stub.prototype = Object.create(mongoose.Document.prototype);
Expand Down

0 comments on commit 20d1500

Please sign in to comment.