jsdom-global icon indicating copy to clipboard operation
jsdom-global copied to clipboard

Not implemented: window.alert

Open Igor-Vuk opened this issue 7 years ago • 5 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

Igor-Vuk avatar May 09 '17 14:05 Igor-Vuk

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

DcsMarcRemolt avatar May 12 '17 11:05 DcsMarcRemolt

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

Igor-Vuk avatar May 13 '17 01:05 Igor-Vuk

this is actually a jsdom issue, workaround is here:

https://github.com/tmpvar/jsdom/issues/1843

modosc avatar Oct 19 '17 17:10 modosc

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

jonknowles avatar Nov 02 '17 14:11 jonknowles

Any updates on this issue?

cowardcalf avatar Jan 29 '18 03:01 cowardcalf