Sam, were you ever able to get this all working? I’m having a hard time getting jest/enzyme to even run with onsen. Curious to hear what you did to even get tests to run.
M
Save
Saving
mbessieres
@mbessieres
2
Reputation
2
Posts
489
Profile views
0
Followers
0
Following
Posts made by mbessieres
-
RE: How to reach to a popover from Enzyme in full DOM (mount) rendering test
-
Testing React Onsen Apps
I’ve been doing tons of research online to see if anyone has gotten jest+enzyme working in an onsen+react context. So far I haven’t found any articles with the magic bullet as of July 2018. I’m still experiencing the “Invalid State” error on importing onsenui or finding window.document to be undefined.
Has anyone gotten this working either using undom as Fran recommends below or another solution?
Re: How are you testing React Onsen Apps?
I attempted the recommendation in this SO thread as well and that didn’t make window.document available to reoct-onsenui when it was imported either at this point:
SO: react onsenui mocha test error “Error: Invalid state”
I would be grateful to hear any recommendations / experiences of others. Thanks!