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

Node.js URL gets undefined #61

Open
vascoyannic opened this issue Jul 18, 2022 · 1 comment
Open

Node.js URL gets undefined #61

vascoyannic opened this issue Jul 18, 2022 · 1 comment

Comments

@vascoyannic
Copy link

Hey,

just had this weird behaviour with the following code:

const jsdomGlobal = require('global-jsdom');

console.log(URL, "Test 1");
const cleanup = jsdomGlobal("<html><body></body></html>");
console.log(URL, "Test 2");
cleanup();
console.log(URL, "Test 3");

Test 1 and Test 2 print to the console just as expected, however Test 3 throws ReferenceError: URL is not defined

@vilyus
Copy link

vilyus commented Mar 17, 2023

I encountered the same with Blob on node >= 18 after cleanup: ReferenceError: Blob is not defined

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