title: Jest test failure with React component
body: <p>I am trying to test a react component, here is the test</p>
  
  <pre><code>jest.dontMock('../js/components/Navigation.js');
  var React = require('react/addons');
  var Navigation = require('../js/components/Navigation.js');
  var Router = require('react-router').Router;
  var Route = require('react-router').Route;
  var Link = require('react-router').Link;
  TestUtils = React.addons.TestUtils;
  
  describe('Navigation', function() {
  
   var NavElement = TestUtils.renderIntoDocument(
      &lt;Navigation items={['nav1', 'nav2', 'nav3']} /&gt;
    );
  
    var items = TestUtils.scryRenderedDOMComponentsWithTag(NavElement, 'li');
  
  
    it('renders each item as a li', function() {
      expect(items.length).toEqual(3);
  
  
    });
  
  
  });
  </code></pre>
  
  <p>Here is the component</p>
  
  <pre><code>var React = require('react');
  var Router = require('react-router').Router;
  var Link = require('react-router').Link;
  var RouteHandler = require('react-router').RouteHandler;    
  
  var Navigation = React.createClass({
      render: function() {
          return (
              &lt;div&gt;
              &lt;header&gt;
              &lt;ul&gt;
              &lt;li&gt;&lt;Link to="nav1"&gt;nav1&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link to="nav2"&gt;nav2&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link to="nav3"&gt;nav3&lt;/Link&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;/header&gt;
              &lt;RouteHandler /&gt;
              &lt;/div&gt;
              );
          }
      });
  </code></pre>
  
  <p>When I run 'npm test' I get the following arning and error
  Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).</p>
  
  <pre><code>  - Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>I tried removing and resintsalling node modules
  Also tried importing as</p>
  
  <pre><code>var Navigation = require('../js/components/Navigation.js').default;
  </code></pre>
  
  <p>And using </p>
  
  <pre><code>modules.export = Navigation;
  </code></pre>