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
{{ message }}
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
The props of a chart are set as dependencies of the useChart hook and shallow checked, causing them to be considered different in every side-effect. The following test represents the problem:
it('should not cause a re-render if props did not change',()=>{constchartFunc=chartMock()chartFunc.foo=jest.fn()constChart=BaseChart(()=>chartFunc,[baseMixin])const{ rerender }=render(<Chartfoo="bar"/>)expect(chartFunc.foo).toHaveBeenCalledTimes(1)rerender(<Chartfoo="bar"/>)expect(chartFunc.foo).toHaveBeenCalledTimes(1)})
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The props of a chart are set as dependencies of the
useChart
hook and shallow checked, causing them to be considered different in every side-effect. The following test represents the problem:The text was updated successfully, but these errors were encountered: