title: How to mock useNavigation hook in react-navigation 5.0 for jest test?
body: <p>i want to mock useNavigation hook used inside my functional component. Any workaround how to mock it using jest?</p>
  
  <pre><code>import React from 'react';
  import { useNavigation } from '@react-navigation/native';
  import { TouchableOpacity } from 'react-native';
  
  const MyComponent = () =&gt; {
    const { navigate } = useNavigation();
  
    const navigateToScreen = () =&gt; {
      navigate('myScreen', { param1: 'data1', param2: 'data2' })
    }
  
    return (&lt;TouchableOpacity onPress={navigateToScreen}&gt;
         Go To Screen
       &lt;/TouchableOpacity&gt;)
  }
  </code></pre>
  
  <p>how to test params being passed in navigate function ?</p>