The dash-daq library is still using an old version of React (15.x.x). Dash versions 1.0.0 and higher are incompatible with versions of React that come before 16.0.0.
I also ran into an issue with find() in the tests returning an object and not the actual data, which are needed for calculations of length. I implemented the fix suggested here https://github.com/airbnb/enzyme/issues/1393 by adding hostnodes() after the call to find().
In the test for displays updates with correct value, setState was actually not being called on the mounted component. I changed the test to use a similar pattern as described in https://github.com/airbnb/enzyme/issues/1794#issuecomment-508007334 (this is a known issue with Enzyme, and further discussion can be found in that thread).
Closes #57
About
The
dash-daq
library is still using an old version of React (15.x.x
). Dash versions1.0.0
and higher are incompatible with versions of React that come before16.0.0
.After updating the React requirements, I also updated the version of
enzyme
from2.x
to3.x
, using this guide provided by the authors of that package: https://airbnb.io/enzyme/docs/guides/migration-from-2-to-3.htmlI also ran into an issue with
find()
in the tests returning an object and not the actual data, which are needed for calculations of length. I implemented the fix suggested here https://github.com/airbnb/enzyme/issues/1393 by addinghostnodes()
after the call tofind()
.In the test for
displays updates with correct value
,setState
was actually not being called on the mounted component. I changed the test to use a similar pattern as described in https://github.com/airbnb/enzyme/issues/1794#issuecomment-508007334 (this is a known issue with Enzyme, and further discussion can be found in that thread).