status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 987 forks source link

component tests fail after upgrading react native to 0.72.x #17409

Closed siddarthkay closed 1 year ago

siddarthkay commented 1 year ago

Problem

After upgrading react-native, make component-test fails with :

 SyntaxError: /Users/siddarthkumar/code/experiments/status-mobile/node_modules/@react-native/js-polyfills/error-guard.js: Missing semicolon. (14:4)

      12 | let _inGuard = 0;
      13 |
    > 14 | type ErrorHandler = (error: mixed, isFatal: boolean) => void;
         |     ^
      15 | type Fn<Args, Return> = (...Args) => Return;
      16 |
      17 | /**

Assumptions

Related links

Blocks https://github.com/status-im/status-mobile/pull/17241

siddarthkay commented 1 year ago

The issue was fixed by downgrading jest to 26.x upgrading jest requires significant changes to our test suite and can be an independent task in itself cc @J-Son89 @ilmotta

ilmotta commented 1 year ago

The issue was fixed by downgrading jest to 26.x upgrading jest requires significant changes to our test suite and can be an independent task in itself cc @J-Son89 @ilmotta

Thanks @siddarthkay. I forgot the number of times in my life I read the sentence "upgrading jest requires significant changes".