title: How to setup multiple Environments in CypressJs
body: <p>I haven't been able to figure out how to setup my cypressJs environments correctly to test. I'd love some help.</p>
  
  <p>In my <code>index.html</code> file, in the <code>&lt;script&gt;</code> area, i am adding a <code>CONFIG</code> object. In production, this config object is added in by the MVC app.  This config object can have many different states (some info might be missing or different for each user). In the <code>cypress.json</code> file, under "env" I have this same object. I use this in the <code>spec.js</code> files by calling <code>Cypress.env("CONFIG");</code> which works just fine.</p>
  
  <p>However, I want to change the state of the app/environment variable for different tests. Is this possible?</p>
  
  <p>I'd like to run a spec file using a <code>CONFIG</code> that has all the data and one spec file using a <code>CONFIG</code> object that is missing data (ex. address == null) so I can test properly under both circumstances.</p>
  
  <p>Is this possible or am I doing something fundamentally wrong?</p>
  
  <p><code>index.html</code></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
     &lt;script&gt;
      CONFIG = {
      dealer: {
            id: 19285,
            address: "343 Somewhere Lane SpringField, TN 47383",
            name: "HUDSON TRACTOR &amp; RENTAL EQUIPMENT &amp; OTHER HEAVY THINGS
     }
     &lt;/script&gt;
    &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><code>cypress.json</code></p>
  
  <pre><code>{
   "env": {
     "CONFIG": {
        dealer: {
            id: 19285,
            address: "343 Somewhere Lane SpringField, TN 47383",
            name: "HUDSON TRACTOR &amp; RENTAL EQUIPMENT &amp; OTHER HEAVY THINGS
        }
      }
    }
  }
  </code></pre>