jest-mongodb
jest-mongodb copied to clipboard
$pull or $pullAll are not working
Hi,
I can't believe I'm actually posting this issue but It's my last chance to fix my problem. I can't use $pullAll update operator with jest-mongo. It's working well with my actual database. But when I ran my units tests (jest), they failed because this operation is doing nothing on a mongodb memory server.
await AccountModel.updateOne(
{ uid: userId },
{ $pullAll: { fcmTokens: fcmTokens }, $set: { nickname: "ooo" } }
).exec();
Here is my code sample, the $set operation is done but not the $pullAll.
node v14.15.1
"@shelf/jest-mongodb": "^1.2.3",
"mongoose": "^5.11.15",