Unit testing a react component with NextIntlProvider using Jest #513
Replies: 4 comments 4 replies
-
If you install |
Beta Was this translation helpful? Give feedback.
-
i am using [email protected] and am still getting this error in my jest unit tests:
I am now using NextIntlClientProvider rather than the older IntlProvider. Maybe this works for App Router and not for Pages Router any more? That doesn't make sense to me either. In the stack trace I see: Where is next-intl/_useLocale, because I don't see it? |
Beta Was this translation helpful? Give feedback.
-
I have the same problem running |
Beta Was this translation helpful? Give feedback.
-
I agree this is still broken. I am also using the Pages router. The application works fine, it's just all the tests failing. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I'm getting an error working on
"next-intl": "3.0.0-beta.18"
,"jest": "^27.5.1",
,"ts-jest": "^27.1.3",
Below here is my code:
useExperienceDuration.test.tsx
Has someone recently faced it, and solved it?
Many thanks for considering my request.
Kyle
Beta Was this translation helpful? Give feedback.
All reactions