title: How do I mock a user created window property?
body: <p>I have a javascript utility file that makes API requests.  It has two conditional's at the top that rely on window.VarA and window.VarB.  Where VarA and VarB are variables given to the window by our software.  If they are set the code inside the conditional is run.  Since this file doesn't actually render a window I can't set these properties to anything and get code coverage inside the conditional. </p>
  
  <p>I've attempted rendering a default window but that doesn't seem to work.  I have Jest and Enzyme available to me.</p>
  
  <p>The code from the object that I am testing looks like this</p>
  
  <pre><code>let param = "";
  let url = "";
  if(window.VarA !== underfined){
       param = window.VarA; &lt;&lt;--need coverage here
  }
  if(window.VarB !== underfined){
       url = window.VarB; &lt;&lt;--need coverage here
  }
  </code></pre>
  
  <p>Is there some way to mock these window properties for my tests?</p>