title: TypeError: Cannot read property 'language' of undefined
body: <p>I'm trying to run <em>App-test.js</em> file provided by react native in <em>__test__</em> that is </p>
  
  <pre><code>import 'react-native';
  import React from 'react';
  import App from '../src/app';
  
  // Note: test renderer must be required after react-native.
  import renderer from 'react-test-renderer';
  
  it('renders correctly', () =&gt; {
    renderer.create(&lt;App /&gt;);
  });
  </code></pre>
  
  <p>Jest in <strong>package.json</strong> looks like this</p>
  
  <pre><code>...
    "jest": {
      "preset": "react-native",
      "setupFiles": [
        "&lt;rootDir&gt;/node_modules/react-native-gesture-handler/jestSetup.js"
      ],
      "transformIgnorePatterns": [
        "node_modules/(?!react-native)/"
      ],
      "globals": {
        "__DEV__": true
      },
      "testEnvironment": "node"
    }
  ...
  </code></pre>
  
  <p>I'm using package <strong>react-native-localization</strong> that is working fine in app but giving error while running jest, that is:</p>
  
  <pre><code>__tests__/App-test.js
    ● Test suite failed to run
  
      TypeError: Cannot read property 'language' of undefined
  
         5 | import fr from './fr';
         6 | 
      &gt;  7 | let localize = new LocalizedStrings({
           |                ^
         8 |     en: en,
         9 |     fr: fr
        10 | });
  
        at Object.customLanguageInterface (node_modules/react-native-localization/lib/LocalizedStrings.js:49:23)
        at LocalizedStrings.call (node_modules/localized-strings/lib/LocalizedStrings.js:67:42)
        at new LocalizedStrings (node_modules/react-native-localization/lib/LocalizedStrings.js:63:117)
        at Object.&lt;anonymous&gt; (src/common/language/localizeController.js:7:16)
        at Object.&lt;anonymous&gt; (src/containers/auth/launchScreen.js:25:1)
  
    console.error node_modules/fbjs/lib/warning.js:30
  
  </code></pre>
  
  <p><strong>localizeController.js</strong> is </p>
  
  <pre><code>import LocalizedStrings from 'react-native-localization';
  
  import en from './en';
  import fr from './fr';
  
  let localize = new LocalizedStrings({
      en: en,
      fr: fr
  });
  
  export default localize;
  
  </code></pre>
  
  <p>Using it like this in launchScreen</p>
  
  <pre><code>import localize from '@common/language/localizeController';
  
  ...
  
  &lt;Text style={styles.titleText}&gt;{localize.Title}&lt;/Text&gt;
  
  ...
  </code></pre>
  
  <p>As this <strong>localize</strong> is used in all components, I can't test any component.</p>