jsdom wrapper to help write test code that works both in the browser and in node