title: Jest / Enzyme - How to test at different viewports?
body: <p>I am trying to run a test on a component at a certain viewport width. I am doing the following, but this doesn't seem to change it:</p>
  
  <pre><code>test('Component should do something at a certain viewport width.', () =&gt; {
      global.innerWidth = 2000;
      const component = mount(&lt;SomeComponent /&gt;);
      ...
  });
  </code></pre>
  
  <p>I also found an article that explains how to do it using JSDom, but as Jest now ships with JSDom, I wondered if there was a native solution.</p>
  
  <p><a href="https://www.codementor.io/pkodmad/dom-testing-react-application-jest-k4ll4f8sd" rel="noreferrer">https://www.codementor.io/pkodmad/dom-testing-react-application-jest-k4ll4f8sd</a></p>