Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix tests
  • Loading branch information
vkarpov15 committed Jun 17, 2024
commit 20d1500f274da5226a4b12bc9c95e1a5a823bfa6
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