doc = jsdom.jsdom("<!doctype html><html><body></body></html>"); global.document = doc; global.window = doc.defaultView;
Unit-testing React code
Bartosz Szczeciński
21

you could also put this information within a separate file and call it globally with — require ./test/setup-jsdom.js

Show your support

Clapping shows how much you appreciated Anyul Rivas’s story.