Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid URL error #12

Open
linnett opened this issue Sep 2, 2016 · 1 comment
Open

Invalid URL error #12

linnett opened this issue Sep 2, 2016 · 1 comment

Comments

@linnett
Copy link

linnett commented Sep 2, 2016

I'm getting the following error when importing into ES6 tests like this import 'jsdom-global/register'.

<project-root>/node_modules/whatwg-url/lib/URL-impl.js:19
      throw new TypeError("Invalid URL");

TypeError: Invalid URL

Do you know why this could be?! Thanks

@balthazar
Copy link

The issue most likely comes from the fact the window location is not properly initiated. about:blank cannot be parsed as an URL.

I fixed a similar issue by doing something like

window.location = {
  href: 'http://localhost'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants