title: Set location.hash and location.href with JSDom
body: <p>I am setting up some tests using <a href="https://github.com/tmpvar/jsdom" rel="noreferrer">JSDom</a> where I need the <code>window</code> and <code>document</code> globals and also need to pass a different URL/href for each tests. How do I set the <code>location.hash</code> and <code>location.href</code> properties?</p>
  
  <pre><code>global.document = jsdom({url: 'http://localhost?something=not#test', 'html': ''});
  global.window = document.defaultView;
  console.log(window.location.href); // returns 'about:blank'
  console.log(window.location.hash); // returns no value
  </code></pre>
  
  <p>I have tried assigning values directly to <code>window.location.hash</code> with same result.</p>