I am trying to test a component in react using jest and react-testing-library where
let newWindow = window.open();
newWindow.document.write()
I am getting error like: “cannot read property write of undefined”. I am not sure on how to achieve this.