title: How to write unit test cases for navigation stack in react native using enzyme jest?
body: <p>I am new to react native and trying to write unit test cases. I am able to write snapshot test cases but not sure how to write unit test cases for navigation stack.</p>
  
  <p>is there any way to write unit test cases for navigation?</p>
  
  <p>navigator.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { createStackNavigator } from 'react-navigation-stack';
  import { createAppContainer } from 'react-navigation';
  import HomeScreen from '../component/HomeComponent/home';
  import ThumbnailView from '../component/ThumbnailComponent/thumbnailView';
  import AlbumDetailsView from '../component/AlbumDetailsComponent/albumDetailsView';
  
  
  const MainNavigator = createStackNavigator({
    HomeScreen: { screen: HomeScreen },
    ThumbnailViewScreen: { screen: ThumbnailView },
    AlbumDetailsViewScreen: { screen: AlbumDetailsView },
  },
  {
    defaultNavigationOptions: {
      headerTintColor: '#fff',
      headerStyle: {
        backgroundColor: '#0c82f3',
      },
      headerTitleStyle: {
        fontWeight: 'bold',
      },
    },
  });
  
  const NavigationApp = createAppContainer(MainNavigator);
  export default NavigationApp;</code></pre>
  </div>
  </div>
  </p>