WrathChaos/react-navigation-helpers

How to test?

ChARCOOL opened this issue · 0 comments

I couldn't find any documentation about testing. How can I test this library? We have components where we use navigationRef.isReady(), navigationRef.dispatch() and StackActions.push(). When I use navigationRef in NavigationContainer in test environment it throws error saying Warning: Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: an object with keys {isReady, dispatch}.. Testing only react-navigation stuff seems to work without problem e.g navigation.push().