Changing global document breaks tests
petejodo opened this issue · comments
This line is breaking tests using jsdom. Looks to be changing global document. Commenting it out fixes the tests but unsure if it breaks anything within this module
I had the same problem and created Pull Request to fix it #4
The reason why library react-unit
needs document
to be set lies in the library fbjs
. fbjs
is used by react and it is accessing the document directly and throwing error if there is no document.
https://github.com/facebook/fbjs/blob/master/src/core/dom/getActiveElement.js
I've opened PR for the issue as well.
Hi guys, expect this to be merged and published by next Monday.
Cheers.
Merged into master and published as v1.0.6.
Thanks @kamilio !