title: How to send environment variables to Jest CLI?
body: <p>I have a script that runs a Jest test for me, and I want to set an environment variable before running it, something like this:</p>
  
  <p><strong>my_test_script.sh</strong></p>
  
  <pre><code>IMPORTANT_ENV_VAR=value_that_matters
  ./node_modules/.bin/jest --useStderr ./__tests__/my.test.js
  </code></pre>
  
  <p>However, inside "my.test.js" the <code>IMPORTANT_ENV_VAR</code> is not set when I run my test like this.</p>
  
  <p>How do I pass the environment variable into the Jest CLI ?</p>