Skip to content

Node.js URL gets undefined #61

@vascoyannic

Description

@vascoyannic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions