title: JSDom 11.12.0 - how to mock localStorage?
body: <p>Since the latest release of JSDom, I'm not able to mock <code>localStorage</code> anymore.</p>
  
  <p>I've tried the following methods:</p>
  
  <ol>
  <li><code>Object.defineProperty(window, 'localStorage', {value: LocalStorageMock})</code></li>
  <li><code>window.localStorage = LocalStorageMock;</code></li>
  <li><code>jest.spyOn(window.localStorage, 'setItem')</code></li>
  </ol>
  
  <p>Any of those methods not worked for me, I get always the original <code>localStorage</code>.</p>