Closed KonnorRogers closed 2 years ago
Just FYI, DOMParser
is a browser API so it won't work in Node. It happens to still work here because JSDOM implements it. So in a roundabout way, this still depends on JSDOM globals being added. I think this sort of solves the problem since as long as this function isn't executed, it won't cause any problems. But if someone tries to execute this in a Node environment, it'll still crash as DOMParser
doesn't exist.
@CreativeTechGuy I think its a fair tradeoff only because I wouldn't expect to be running "DOM-testing-library" in an environment that wasn't at least JSDOM
@CreativeTechGuy yep, that someone is me :-). This broke our tests, but adding jsdom in as a dependency fixed this.
Apologies @andyleanlibrary !
I'll add a note to the docs.
Fixes #34