score:5

Accepted answer

Create jest-setup.js file (if already not exists) and add following lines in that

import { NativeModules } from 'react-native';

NativeModules.ReactLocalization = {
    language: 'en',
};

now add this to package.json, now JEST in package.json looks like this.

...
"jest": {
    "preset": "react-native",
    "transformIgnorePatterns": [
      "node_modules/(?!react-native|react)/"
    ],
    "setupFiles": [
      "<rootDir>/jest-setup.js"
    ],
    "globals": {
      "__DEV__": true
    },
    "testEnvironment": "node"
  }
...

Now this error is gone. Source

score:0

Are en and fr objects containing a Title property?

en.js should look something like:

export default {
   en: {
    Title: "some title in english"
   }
}

score:0

As Ghayoor ul Haq suggested, only the first step is enough for me. It solved the issue.

import { NativeModules } from 'react-native';

NativeModules.ReactLocalization = {
    language: 'en',
};

Related Query

More Query from same tag