title: How do I test an element that is outside the enzyme wrapper?
body: <p>I'm using <code>Jest</code> and <code>Enzyme</code> to do unit tests.</p>
  
  <p>In my test.js file I have</p>
  
  <pre><code>let wrapper = mount(&lt;app /&gt;
  </code></pre>
  
  <p>My test clicks a button in the wrapper</p>
  
  <pre><code>wrapper.find('button').simulate('click')
  </code></pre>
  
  <p>and the component renders a modal that is outside the wrapper.</p>
  
  <p>I need to get a reference to the modal so I can simulate a click on a button in it. I can get a reference to the modal through <code>document.body.children</code>, but I can't do anything with it.</p>
  
  <p>How do I use enzyme to test an element that is outside the the rendered wrapper?</p>