Testing React Onsen Apps
mbessieres last edited by
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?
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:
I would be grateful to hear any recommendations / experiences of others. Thanks!