You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to upgrade from react-intl v2 to v5 in a rather complex project, and I am running into some issues with unit testing.
The project previously used addLocaleData which I replaced with the RelativeTimeFormat as described in the upgrade guide (v2 -> v3). I also replaced intlProvider.getChildContext() with createIntl as mentioned here: #1519 (comment).
When I run the unit tests, I get the following error: TypeError: Intl.Locale is not a constructor. I tried importing pollyfills but it made no difference. Do you have any idea of how I could solve this issue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to upgrade from react-intl v2 to v5 in a rather complex project, and I am running into some issues with unit testing.
The project previously used addLocaleData which I replaced with the RelativeTimeFormat as described in the upgrade guide (v2 -> v3). I also replaced intlProvider.getChildContext() with createIntl as mentioned here: #1519 (comment).
When I run the unit tests, I get the following error: TypeError: Intl.Locale is not a constructor. I tried importing pollyfills but it made no difference. Do you have any idea of how I could solve this issue?
Beta Was this translation helpful? Give feedback.
All reactions