-
-
Notifications
You must be signed in to change notification settings - Fork 337
Closed
Labels
Description
Description
Since the recent move of next-intl to ESM, running tests with Jest broke.
Verifications
- I've verified that the problem I'm experiencing isn't covered in the docs.
- I've searched for similar, existing issues on GitHub and Stack Overflow.
- I've compared my app to a working example to look for differences.
Mandatory reproduction URL
https://github.com/amannn/next-intl/tree/main/examples/example-app-router
Reproduction description
- Clone the
example-app-routerexample app. - Run the
test:jestscript that is inpackage.json.
Expected behaviour
I expect Jest to run the tests successfully.
What I tried
I feel like I tested just about every configuration combination possible in tsconfig.json and jest.config.ts and followed the Jest docs about using ES modules, to no avail.
I noticed that in #1470 the first breaking change mentioned is
The CommonJS build has been removed. While most tools support ESM out-of-the-box, some might require additional configuration (e.g. Jest might benefit from
next/jest).
but I'm not sure what you mean by "Jest might benefit from next/jest", this is probably where I missed something.
spirosikmd, xanticious, KeyanNamaghi and gianpajservice-paradis