title: TypeError: Cannot read property 'prototype' of undefined in jest test
body: <p>I have a Additional Info component which uses react navigation:</p>
  <pre><code>export class AdditionalInfo extends NavigationPureComponent {
    static navigationOptions = ({ navigation }) =&gt; ({
      headerLeft: &lt;Button icon=&quot;close&quot; onPress={() =&gt; navigation.goBack(null)} /&gt;,
    })
  
    buildNavigator = () =&gt; {
      const { extendedDescriptions } = this.nav.params
      const tabs = {}
  
      extendedDescriptions.forEach(({ caption, description }, index) =&gt; {
        tabs[`Tab${index}`] = {
          screen: () =&gt; (
            &lt;ScrollView style={{ backgroundColor: color('white') }}&gt;
              &lt;Wrapper style={{ paddingTop: spacing() }}&gt;
                &lt;SafeAreaView&gt;
                  &lt;Html html={description} /&gt;
                &lt;/SafeAreaView&gt;
              &lt;/Wrapper&gt;
            &lt;/ScrollView&gt;
          ),
          navigationOptions: {
            title: caption,
          },
        }
      })
  
      return createMaterialTopTabNavigator(tabs, {
        backBehavior: 'none',
        lazy: true,
        tabBarOptions: {
          activeTintColor: color('b'),
          inactiveTintColor: color('b'),
          indicatorStyle: {
            backgroundColor: color('b'),
          },
          scrollEnabled: extendedDescriptions.length &gt; 3,
          style: {
            backgroundColor: color('white'),
          },
        },
      })
    }
  
    render () {
      const AdditionalInfoNavigator = this.buildNavigator()
  
      return &lt;AdditionalInfoNavigator /&gt;
    }
  </code></pre>
  <p>My additionalInfo.test.jsx file looks like:</p>
  <pre><code>describe('Additional Info', () =&gt; {
    test('Additional info component Exists', () =&gt; {
      const length = 4
      const extendedDescriptions = Array.from({ length }).map((value, index) =&gt; ({
        caption: `Tab ${index}`,
        description: `${lorem}`,
      }))
      const obj = shallow(&lt;AdditionalInfo navigation={{ extendedDescriptions }} /&gt;)
    })
  })
  </code></pre>
  <p>I am trying to write a test to check existence of this AdditionalInfo component and maybe a few more however, I am getting a weird error stating</p>
  <pre><code>TypeError: Cannot read property 'prototype' of undefined
  
        15 | 
        16 |     console.debug(extendedDescriptions)
      &gt; 17 |     const obj = shallow(&lt;AdditionalInfo navigation={{ extendedDescriptions }} /&gt;)
  </code></pre>
  <p>I feel am I not providing everything the test instance of AdditionalInfo needs? Or am I not using shallow correctly?</p>
  <p>I am using the NavigationPureComponent which is defined as:</p>
  <pre><code>export const NavigationPureComponent = navMixin(PureComponent)
  </code></pre>
  <pre><code>const navMixin = (CurrentComponent) =&gt; {
    class Nav extends CurrentComponent {
      get nav () {
        const value = new Navigation(this)
        // reset `this.nav` to always be value, this way the this
        // get nav function only gets called the first time it's accessed
        Object.defineProperty(this, 'nav', {
          value,
          writable: false,
          configurable: false,
        })
        return value
      }
    }
  
    Nav.propTypes = {
      navigation: PropTypes.shape({}).isRequired,
    }
  
    return Nav
  }
  </code></pre>