I\'ve come up against this issue Invalid URL is thrown when requiring systemjs in jest test cases
One of the last comments suggests
\"manipulate the jsdom instan
I just went down this road and found out that as of Jest 21.2.1, the official way is to fork your own JSDom environment.
This is a bit painful to set up but allows in-depth customization.
References:
Sample environment: https://github.com/mes/jest-environment-jsdom-external-scripts