React enzyme testing, Cannot read property 'have' of undefined : <p>I'm writing a test using <a href="https://github.com/airbnb/enzyme" rel="noreferrer">Enzyme</a> for React.</p>

<p>My test is extremely straightforward:</p>

<pre><code>import OffCanvasMenu from '../index';
import { Link } from 'react-router';

import expect from 'expect';
import { shallow, mount } from 'enzyme';
import sinon from 'sinon';
import React from 'react';

describe('&lt;OffCanvasMenu /&gt;', () =&gt; {
  it('contains 5 &lt;Link /&gt; components', () =&gt; {
    const wrapper = shallow(&lt;OffCanvasMenu /&gt;);
    expect(wrapper.find(&lt;Link /&gt;)).to.have.length(5);
  });
});
</code></pre>

<p>This code is basically taken directly from <a href="https://github.com/airbnb/enzyme/blob/master/docs/api/shallow.md" rel="noreferrer">airbnb/enzyme docs</a>, but returns the error:</p>

<pre><code>FAILED TESTS:
  &lt;OffCanvasMenu /&gt;
    ✖ contains 5 &lt;Link /&gt; components
      Chrome 52.0.2743 (Mac OS X 10.11.6)
    TypeError: Cannot read property 'have' of undefined
</code></pre>

<p>I'm a little unclear on what I'm doing differently from the docs. Any guidance greatly appreciated.</p>
