FAIL src/actions/__tests__/LocaleActions.test.ts
● Test suite failed to run
SyntaxError: Unexpected token in JSON at position 30294
at JSON.parse (<anonymous>)
> 1 | import texts from './texts.json';
| ^
2 |
3 | const localeData: LocaleData = texts;
4 |
at Runtime._loadModule (node_modules/jest-runtime/build/index.js:796:59)
at Object.<anonymous> (src/locale/LocaleData.ts:1:1)
at Object.<anonymous> (src/actions/LocaleActions.ts:6:1)
The JSON in src/locale/texts.json is invalid (will fail for JSON.parse) because line (The
\ n
not\n
) : https://github.com/MohGovIL/hamagen-react-native/blob/a5e1d4db92fa2d197727f26f1f4ec37f40d3d0ea/src/locale/texts.json#L661 that will returnSyntaxError: JSON.parse: bad escaped character
Related tests failure from
yarn jest