title: How to test 'didFocus' from react navigation with jest
body: <p>I have a component that looks like this</p>
  
  <pre><code>async componentDidMount() {
      const { navigation } = this.props
      this.subs = [
        navigation.addListener('didFocus', () =&gt; this.onComponentFocus()),
      ]
    }
  
    onComponentFocus() {
      const { dispatch } = this.props
      dispatch(fetchDevices())
    }
  </code></pre>
  
  <p>Now i want to write a test that chekcs fetchDevice got called once. The first idea was to mock Navigation like this</p>
  
  <p>const navigation = {
    navigate: jest.fn(),
  }</p>
  
  <p>But now how do I check this.subs and how do i check fetchDevices got fired?</p>