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
Currently, telemetry_management_section.test.tsx prints out console errors when run the unit test. To make a clean unit test, we want to explore the reasons for these errors/warnings and decide whether we could fix or remove them.
console.error
[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry. Using default message as fallback.
at defaultFormatMessage (node_modules/react-intl/lib/index.js:1533:13)
at FormattedMessage.render (node_modules/react-intl/lib/index.js:1638:30)
at finishClassComponent (node_modules/react-dom/cjs/react-dom.development.js:18470:31)
at updateClassComponent (node_modules/react-dom/cjs/react-dom.development.js:18423:24)
at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:20186:16)
at beginWork$$1 (node_modules/react-dom/cjs/react-dom.development.js:25756:14)
at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:24698:12)
at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:24671:22)
at performSyncWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:24270:11)
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom.development.js:23698:7)
at updateContainer (node_modules/react-dom/cjs/react-dom.development.js:27103:3)
at node_modules/react-dom/cjs/react-dom.development.js:27528:7
at unbatchedUpdates (node_modules/react-dom/cjs/react-dom.development.js:24433:12)
console.error
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in OptInExampleFlyout (created by TelemetryManagementSection)
in TelemetryManagementSection (created by WrapperComponent)
in WrapperComponent
75 | const { fetchExample } = this.props;
76 | const clusters = await fetchExample();
> 77 | this.setState({
| ^
78 | data: Array.isArray(clusters) ? clusters : null,
79 | isLoading: false,
80 | hasPrivilegeToRead: true,
at warningWithoutStack (node_modules/react-dom/cjs/react-dom.development.js:530:32)
at warnAboutUpdateOnUnmountedFiberInDEV (node_modules/react-dom/cjs/react-dom.development.js:25738:5)
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom.development.js:23679:5)
at Object.enqueueSetState (node_modules/react-dom/cjs/react-dom.development.js:13994:5)
at OptInExampleFlyout.setState (node_modules/react/cjs/react.development.js:325:16)
at OptInExampleFlyout.componentDidMount (src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx:77:12)
To Reproduce
Run:yarn test:jest {path to telemetry_management_section.test.tsx}
Expected behavior
explore each problem unit test cases and investigate each question:
what causes the console error or issues?
should this unit test log this error or warning message?
if answer to the above question is no, then can we fix it?
The final output is expected to be a cleaned unit test with un-necessary error/warnings been removed.
OpenSearch Version
OpenSearch 1.0.0
Dashboards Version
Dashboards 1.0.0
The text was updated successfully, but these errors were encountered:
Describe the issue
Currently,
telemetry_management_section.test.tsx
prints out console errors when run the unit test. To make a clean unit test, we want to explore the reasons for these errors/warnings and decide whether we could fix or remove them.To Reproduce
Run:
yarn test:jest {path to telemetry_management_section.test.tsx}
Expected behavior
explore each problem unit test cases and investigate each question:
what causes the console error or issues?
should this unit test log this error or warning message?
if answer to the above question is no, then can we fix it?
The final output is expected to be a cleaned unit test with un-necessary error/warnings been removed.
OpenSearch Version
OpenSearch 1.0.0
Dashboards Version
Dashboards 1.0.0
The text was updated successfully, but these errors were encountered: