title: Detox Testing a React Native (Expo) + PouchDB App
body: <p>We are currently working on a React Native app using Expo and are trying to get Detox (E2E Testing) working in our environment. We have spent a lot of time pinpointing where the issue is. The most likely contender seems to be that pouchDB is set up to be live syncing with our database:</p>
  
  <pre><code>LocalDB.sync(RemoteDB, {live: true, retry: true})
    .on('change', onChange)
  </code></pre>
  
  <p>and because of this, detox is waiting for certain network requests to finish that we really don't want detox to wait for:</p>
  
  <pre><code>Sync App State: Waiting for network requests to finish.:
  </code></pre>
  
  <p>Our tests are running fine without syncing. In our detox tests we've tried blocking that url in our beforeAll &amp; beforeEach blocks with the following:</p>
  
  <pre><code>await device.setURLBlacklist(['.*(OUR_IP_THAT_COUCH_IS_SYNCING_WITH).*'])
  </code></pre>
  
  <p>But this on top of the fact that detox doesn't officially support Expo, requiring multiple restarts to open the app, makes it hard to debug.</p>
  
  <p>If anyone has any ideas about this, any help is greatly appreciated!</p>