When testing my React components using enzyme and the enzyme-react-intl package, I get the below error. I'm a bit confused as to why I get this error, because there is already a default locale of 'en' set in the enzyme-react-intl package as seen here.
ERROR LOG: '[React Intl] Error formatting date.
ReferenceError: No locale data has been provided for this object yet.'
I am using the mountWithIntl API to test my component as seen below:
component = mountWithIntl(<CustomComponent propName={propValue} />);
Is there any additional setup required given before mounting the component?
When testing my React components using
enzyme
and theenzyme-react-intl
package, I get the below error. I'm a bit confused as to why I get this error, because there is already a default locale of 'en' set in theenzyme-react-intl
package as seen here.ERROR LOG: '[React Intl] Error formatting date. ReferenceError: No locale data has been provided for this object yet.'
I am using the mountWithIntl API to test my component as seen below:
component = mountWithIntl(<CustomComponent propName={propValue} />);
Is there any additional setup required given before mounting the component?