I have a jest / TS setup with this MongoDB preset running. For another library, I need to add babel and transform 2 libraries that they are working out. This breaks my MongoDB setup, unfortunately.
The first run always works successfully but the second one isn't. I get the following error:
Hi 👋
I've got the following issue.
I have a jest / TS setup with this MongoDB preset running. For another library, I need to add babel and transform 2 libraries that they are working out. This breaks my MongoDB setup, unfortunately.
The first run always works successfully but the second one isn't. I get the following error:
Note: This whole setup worked in a normal repository. Now we have a monorepo and it doesn't work anymore. I have no idea how this plays together tbh.
Here are some of my config files:
apps/infrastructure/test/config/globalSetup.ts
apps/infrastructure/babel.config.js
Reproduce first run
If I want to reproduce the one successful test
preset: '@shelf/jest-mongodb',
injest.config.ts
jest
Do I even need the preset here?
If I comment it in again it works one time and fails the second one.
If I put the whole global setup into the setup after the environment it behaves the same.
I think it has something to do with:
I added this in the repo before it was a monorepo and all worked fine.
I need babel because of this issue https://github.com/erezrokah/aws-testing-library/issues/635#issuecomment-1204851257
I'm happy for any help 🙏