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
Hi,
I have been using Nivo charts. And it is really awesome with customization.
I am unable to test the Responsive bar component with react testing library. The bar is not rendering in the dom though I couldn't proceed with the test cases.
I double checked the parent height and other data values.
Note: I have tried with the react-test-renderer. but the same result.
After debugging the Nivo core library, the responsive wrapper caused the issue by consuming the ResizeObserver browser API. So, we cannot use the ResizeObserver in jest-dom since it is not supported yet.
I have found the workaround for the scenario to mock ResizeObserver and supply the contentRect values from the test.
Hi,
I have been using Nivo charts. And it is really awesome with customization.
I am unable to test the Responsive bar component with react testing library. The bar is not rendering in the dom though I couldn't proceed with the test cases.
I double checked the parent height and other data values.
Note: I have tried with the react-test-renderer. but the same result.
These are my configurations,
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^14.2.1",
"@nivo/bar": "^0.72.0",
"@nivo/core": "^0.72.0",
The text was updated successfully, but these errors were encountered: