Replies: 1 comment
-
I have solved the problem. I also wrongly stated that I ran I followed what was commented in this thread about And as for mongoose, since I'm not using |
Beta Was this translation helpful? Give feedback.
-
I have solved the problem. I also wrongly stated that I ran I followed what was commented in this thread about And as for mongoose, since I'm not using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm running tests with mongodb-memory-server so that I can test locally.
The following error is printed when running pnpm exec vitest --no-threads run
From the documentation:
Since all tests share the same environment, I'm guessing that's why models are created multiple times.
Reproduction repository:
https://github.com/revosw/vitest-mms-repro
The exact reason I'm using --singleThread is because I've found it problematic to run tests in AWS CodeBuild with a constrained environment of 0.25vCPU and 0.5GB RAM with multiple workers. Prisma-based vitest runs work flawlessly with --singleThread, but the ones based on mongoose are struggling with the aforementioned error
Beta Was this translation helpful? Give feedback.
All reactions