infinitered / infinitered/reactotron
Reactotron becomes undefined when mocking with jest
- Dominant language
- TypeScript
- Stars
- 15.6k
- Forks
- 972
- PR merge metrics
- No merged PRs in 30d
Description
I have issues to get Reactotron working in my jest react-native test environment.
Before running a test I simply do
`jest.mock("reactotron-react-native");`, but then I receive an error stating
`TypeError: Cannot read property 'useReactNative' of undefined`

Unfortunately, I don't find any recommendation in your docs for setting reactotron up for testing.
Really appreciate your help in advance! :)
Contributor guide
Research direction
Start by reproducing the React Native test setup with `jest.mock("reactotron-react-native")` and the reported `useReactNative` error. Review the Reactotron testing setup and documentation referenced by the issue; done means the mocking behavior is understood and a working recommendation or documented setup is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100