-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
GPXparser initialize jsdom when it finds that module is not defined:
if(typeof module !== 'undefined'){
require('jsdom-global')();
module.exports = gpxParser;
}
In case if dom will be configured somewhere else it could cause conflicts.
In my case: I have a Vue application using GPXParser and running tests with vitest causing double jsdom initialization.
Could you please change it to something like this:
if(typeof module !== 'undefined'){
if (typeof document == 'undefined') {
require('jsdom-global')();
}
module.exports = gpxParser;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels