forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.0][Test] Wrap FunComponent in unit test with IntlProvider
In the FunctionComponent unit tests, we see many console errors: `Could not find required intl object. <IntlProvider> needs to exist in the component ancestry. ` This is because for some unit tests, we mount the FunctionComponent (with Enzyme's mount()) , which access to the react-intl context by FormattedMessage without their <IntlProvider /> parent wrapper. This PR solves 7 out of 8 unit tests with this issue by wrapping the <IntlProvider /> either through original enzyme_helper functions or a simple wrapper wrapWithIntl. Partically Resolved: opensearch-project#593 Backport PR: opensearch-project#654 Signed-off-by: Anan Zhuang <[email protected]>
- Loading branch information
Showing
11 changed files
with
561 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.