title: How to get full test coverage with Jest and ReactJS, currently at 90.48% statements, 58.06% branch
body: <p>With the simplest ReactJS component Jest is not reporting full test coverage. How to get statements and branch to show 100%.</p>
  
  <p>Currently Jest shows <code>90.48% statements, 58.06% branch</code>.
  Run with <code>jest --coverage</code>.</p>
  
  <p><strong>MyThing.js</strong></p>
  
  <pre><code>import React from 'react';
  
  export default class MyThing extends React.Component {
    render() {
      return (
        &lt;div&gt;
          Stuff
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p><strong>MyThing-test.js</strong></p>
  
  <pre><code>// __tests__/MyThing-test.js
  
  jest.unmock('../app/views/static/MyThing');
  
  import React from 'react';
  import ReactDOM from 'react-dom';
  import TestUtils from 'react-addons-test-utils';
  
  import MyThing from '../app/views/static/MyThing';
  
  
  describe('MyThing', () =&gt; {
  
      const instance = TestUtils.renderIntoDocument(
          &lt;MyThing /&gt;
      );          
  
    it('gets rendered', () =&gt; {    
      expect( TestUtils.isCompositeComponent(instance) ).toBeTruthy();        
    });
  
  
    it('is not DOM component', () =&gt; {   
     // checks if is a standard DOM element, i.e. &lt;div&gt;
      expect( TestUtils.isDOMComponent(instance) ).not.toEqual(true);    
    });
  
    it('isElementOfType is React element', () =&gt; {  
      expect( TestUtils.isElementOfType(&lt;MyThing /&gt;, MyThing) ).toEqual(true);
    });
  
    it('render()', () =&gt; {    
      const retVal = instance.render();
  
      expect( retVal.type ).toEqual("div");       
    });
  
  });
  </code></pre>