Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
siddarthkay opened this issue Sep 25, 2023 · 2 comments
Closed

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

siddarthkay opened this issue Sep 25, 2023 · 2 comments
Assignees

Comments

@siddarthkay
Copy link
Contributor

siddarthkay commented Sep 25, 2023

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

  • Caused due to upgrading versions of jest.
  • This code is either not transformed properly so could be a change we need to make in babel config or jest config.
  • Probably this file should have been ignored by jest and this looks like flow(react native uses flow for type checking) code so most likely a babel typescript plugin won't help.

Related links

Blocks #17241

@siddarthkay siddarthkay self-assigned this Sep 25, 2023
@siddarthkay
Copy link
Contributor Author

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
Copy link
Contributor

ilmotta commented Oct 2, 2023

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants