couleurbummel
couleurbummel copied to clipboard
Inconsistent react versions
Is there an existing issue for this?
- [X] I have searched the existing issues
Happening on the latest app version?
- [X] I have seen this on the latest version of the app
This is not a data update request
- [X] 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