-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Thank you for a very good library!
I'm able to mock populate() when called in a chain like so:
find()
.sort({ createdAt: -1 })
.limit(5)
.populate("foreignKey");
I'm not able to mock populate() when called directly, e.g:
const doc = new MyModel({
content: content,
foreignKey: foreignKey
});
await doc.save();
await doc.populate("foreignKey");
I get:
TypeError: Cannot read properties of null (reading 'populate')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels