-
Notifications
You must be signed in to change notification settings - Fork 57
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
Cannot be loaded in Jest / JSDOM due to side-effect #106
Comments
@eric-burel can you provide some more info please? Perhaps some of the error logs you're seeing? What files (and line numbers?) you can tell are involved? |
This is due to the Mapbox GL JS bundle and has been fixed in their latest release v2.7.0 (with mapbox/mapbox-gl-js#11370). |
Thanks for finding and sharing that @amaechler. This library will have to remain at mapbox-gl-js v1, however. Is there any indication they'll make the change as well back in their v1? (As a side note, we have also considered changing our dependency over to maplibre-gl-js, but do not have any concrete roadmap plans to evaluate it further yet.) |
That I do not know. There seem to be backports of fixes from time to time though, so it might be possible. |
Thanks! We can leave this here for now and monitor over time. |
@gavinr can we go ahead and close this for now and re-open if necessary in the future? |
Hi,
I have small issue when importing a component that uses this package. It seems to call
window.URL.createObjectURL
as soon as you import the package (even before using it), but this function doesn't exist in JSDOM. Do you think this kind of side-effect could be avoided?The text was updated successfully, but these errors were encountered: