Skip to content

Commit 3ddc1e6

Browse files
committed
test: add extra if populated check to hydrate virtual test #15048
1 parent d9270fd commit 3ddc1e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/model.hydrate.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ describe('model', function() {
159159
{ hydratedPopulatedDocs: true }
160160
);
161161

162+
assert(hydrated.populated('stories'));
162163
assert.equal(hydrated.stories[0]._id.toString(), story1._id.toString());
163164
assert(typeof hydrated.stories[0]._id == 'object', typeof hydrated.stories[0]._id);
164165
assert(hydrated.stories[0]._id instanceof mongoose.Types.ObjectId);

0 commit comments

Comments
 (0)