Im using mongo aggregation with mongoose. It works fine, but fails when run in jest.
I get the error:
MongoError: Unrecognized pipeline stage name: '$set'
when using $set inside an aggregation
$set: {
isUsersContent: {
$eq: ["$teacher._id", user._id],
},
}
"mongoose": "^5.3.12", "jest": "^25.1.0",