Making tests pass with jsdom