title: How to unit test static navigationOptions with Jest and Enzyme while using React Navigation and TypeScript?
body: <p>I'm building a React Native app with TypeScript. I'm doing my component tests using Jest and Enzyme. I'm also using React Navigation.</p>
  
  <p>One of my screens has the following <code>navigationOptions</code>:</p>
  
  <pre><code>static navigationOptions = ({ navigation }: NavigationScreenProps) =&gt; ({
  headerLeft: Platform.select({
    android: (
      &lt;Icon
        name="md-menu"
        type="ionicon"
        containerStyle={styles.icon}
        onPress={navigation.toggleDrawer}
      /&gt;
    ),
    ios: null
  }),
  headerTitle: strings.homeTitle
  </code></pre>
  
  <p>});</p>
  
  <p>I want to write unit test ensuring that the <code>&lt;Icon /&gt;</code> component gets rendered. Similar to here:</p>
  
  <pre><code>const props = createTestProps({});
  const wrapper = shallow&lt;HomeScreen&gt;(&lt;HomeScreen {...props} /&gt;);
  
  it("should render a &lt;View /&gt;", () =&gt; {
    expect(wrapper.find(View)).toHaveLength(1);
  });
  </code></pre>
  
  <p>My problem is, I can't figure out the selector to select it. How can I select <code>static navigationOptions</code>?</p>
  
  <p>I also tried going over the wrapper like this:</p>
  
  <pre><code>expect(wrapper.instance().navigationOptions)
  </code></pre>
  
  <p>But the wrapper's instance does not have the navigationOptions.</p>