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

Inconsistent react versions #14

Open
3 tasks done
muffix opened this issue Dec 31, 2022 · 0 comments
Open
3 tasks done

Inconsistent react versions #14

muffix opened this issue Dec 31, 2022 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@muffix
Copy link
Owner

muffix commented Dec 31, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Happening on the latest app version?

  • I have seen this on the latest version of the app

This is not a data update request

  • I am not requesting a data update

Explain what you did

I tried to replace the component redefinition of the custom navigation with a reference to CustomDrawerContent directly. This works in the app, but the tests rendering the component are all failing with an "invalid hook call" message.

Describe the bug

Some project dependencies require conflicting versions of react. For example, react-native@npm:^0.70.6 requires [email protected], but we also have [email protected] in the package.json, which requires [email protected]. This can lead to inconsistent behaviour in tests because we have mismatching versions of react, potentially in use at the same time.

Expected behaviour

All dependencies should be unambiguous

Steps to reproduce

1. Replace `drawerContent={props => <CustomDrawerContent {...props} />}>` with `drawerContent={CustomDrawerContent}>`
2. Run tests
3. Observe the error

Your device and OS

Jest tests with the project Node version and dependencies as in 7d255154.

Screenshots

No response

@muffix muffix added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant