liqula / react-hs

A GHCJS binding to React based on the Flux design. The flux design pushes state and complicated logic out of the view, allowing the rendering functions and event handlers to be pure Haskell functions.
32 stars 10 forks source link

foreignClass, foreign_ do not work with enzyme. #16

Closed fisx closed 7 years ago

fisx commented 7 years ago

~HAVE:~

~WANT:~

(further investigation needed.)

fisx commented 7 years ago

it's also possible that

fisx commented 7 years ago

Nope, I was pretty far off. The problem was that in foreign_, we call a foreign function that looks up the argument in the global js variable window, but when running the test suite on node, that fails.

I have made js_lookupWindow account for both setups, and did a bit of refactoring during the investigation phase.