rstacruz / jsdom-global

Enable DOM in Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not implemented: window.alert

Igor-Vuk opened this issue · comments

After upgrading to the new version of jsdom and jsdom-global I am getting this issue. Code that I am testing has this line inside of it window.alert('Please try again'). It was not a problem until now?

Thanks

It seems, most of the not DOM specific globals are now gone. Things like window.Object also give me undefined now.

Yeah. Not sure how to resolve this. I wanna test that alert showed up but always getting the not implemented message.

this is actually a jsdom issue, workaround is here:

jsdom/jsdom#1843

It seems window.Object and window.Math are also not available, so I also had to roll back to jsdom < 10

Any updates on this issue?