MohGovIL / hamagen-react-native

Israel's Ministry of Health's COVID-19 Exposure Prevention App
https://health.gov.il/
MIT License
508 stars 153 forks source link

Invalid JSON in src/locale/texts.json (bad escaped character) #257

Closed emanuelb closed 4 years ago

emanuelb commented 4 years ago

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 return SyntaxError: JSON.parse: bad escaped character

Related tests failure from yarn jest

 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)
kaplanlior commented 4 years ago

Thanks for noticing :+1: