title: ReferenceError: React is not defined in jest tests
body: <p>I have the following line that executes correctly in browser</p>
  
  <p><code>eval(Babel.transform(template, { presets: ['react'] }).code);</code></p>
  
  <p>but when I run jest tests I am getting <code>ReferenceError: React is not defined</code></p>
  
  <p>What am I missing?</p>
  
  <p>More info:
  in the test file I have the following:</p>
  
  <pre><code>const wrapper = shallow(&lt;MyComponent/&gt;);
  const instance = wrapper.instance();
  instance.componentFunction(...)
  </code></pre>
  
  <p>and then the componentFunction has the <code>eval(Babel.transform(template, { presets: ['react'] }).code);</code> line where <code>template</code> is something it gets from the test file and can be something like <code>&lt;span&gt;...&lt;/span&gt;</code></p>
  
  <p>Please let me know if more details are needed</p>