title: How to wait for Redux Persist to rehydrate before ending test
body: <p>I have the following code:</p>
  
  <pre><code>const App = () =&gt; {
      return (
          &lt;Provider store={store}&gt;
              &lt;PersistGate persistor={persistor} loading={&lt;Text&gt;Loading!&lt;/Text&gt;}&gt;
                  &lt;ConnectedRootComponent /&gt;
              &lt;/PersistGate&gt;
          &lt;/Provider&gt;
      );
  };
  
  export default App;
  </code></pre>
  
  <p>which uses redux-persist to rehydrate state, and before this is complete, it will show what's sitting in the loading property. I have a Jest test (just the default one that comes with react native out of the box):</p>
  
  <pre><code>it('renders without crashing', () =&gt; {
    const rendered = renderer.create(&lt;App /&gt;).toJSON();
    console.log("Rendering: " + JSON.stringify(rendered));
    expect(rendered).toBeTruthy();
  });
  </code></pre>
  
  <p>but although the test passes I see that the actions that <code>persist/PERSIST</code> and <code>persist/REHYDRATE</code> are still occurring, and the value printed to the console in the test (the rendered output) is:</p>
  
  <pre><code>{
      "type": "Text",
      "props": {
          "accessible": true,
          "allowFontScaling": true,
          "ellipsizeMode": "tail"
      },
      "children": ["Loading!"]
  }
  </code></pre>
  
  <p>What I want to do is wait until redux-persist has completed hydration, and then check the rendered value. How can I do this?</p>