I'm currently tests for an angular app I'm working on and im running into difficultly testing a function which will simply open up a new window to an external site. When I run tests on my function, I get an error
Error: Not implemented: window.open
Below is some code, the first line is where I'm getting the error
const blankWindow = window.open('', _blank);
blankWindow.location.href = externalSiteUrl
How do I fix this function to ensure I don't get this error? Is there another way to test opening a window in a new location to avoid this issue althogether?
Thanks