Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$pull or $pullAll are not working #251

Open
c4c1us opened this issue Feb 4, 2021 · 0 comments
Open

$pull or $pullAll are not working #251

c4c1us opened this issue Feb 4, 2021 · 0 comments

Comments

@c4c1us
Copy link

c4c1us commented Feb 4, 2021

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",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant