title: React Native testing components with depends on another components
body: <p>I'm using <code>Jest</code> and <code>react-test-renderer</code> for test my components. When I test pure component with import only from <code>react-native</code> modules, everything is ok.
  for example when I test below component:</p>
  <pre><code>import React from 'react';
  import {Text, View} from 'react-native';
  
  export default class Splash extends React.Component {
      constructor(props) {
          super(props);
      }
  
      render() {
          return (
              &lt;View testID={'splash-test-1'}&gt;
                  &lt;Text&gt;This is Splash Screen&lt;/Text&gt;
              &lt;/View&gt;
          );
      }
  }
  </code></pre>
  <p>with below code, test will passed and no problem:</p>
  <pre><code>it('Splash Screen', () =&gt; {
      const screen= renderer.create(&lt;Splash/&gt;).root;
      expect(screen.findByProps({testID: 'splash-test-1'}).children.length).toBe(1);
  })
  </code></pre>
  <p>But when I add <strong>any modules</strong>, like RBFetchblob (e.g <code>import RNFetchBlob from &quot;rn-fetch-blob&quot;;</code>) on top of my code, I get an error. for example in importing RNFetchblob, get follow error:</p>
  <pre><code>● Test suite failed to run
  
      D:\Projects\MyProject\node_modules\rn-fetch-blob\index.js:5
      import {
      ^^^^^^
  
      SyntaxError: Cannot use import statement outside a module
  ......
  </code></pre>
  <p>My question is how can I test react native components in a real project with many dependencies?</p>