title: React Snapshot testing with jest - Failed prop type: Invalid prop `children` of type `string` supplied
body: <p>I am trying to test a pure react component.</p>
  
  <h1>Component</h1>
  
  <pre><code>import React, {Component} from 'react';
  
  class App extends Component {
      constructor (props){
          super(props);
          props.init();
      }
  
      render() {
          return (
              &lt;div className="container-wrapper"&gt;
                  {this.props.children}
              &lt;/div&gt;
          );
      }
  }
  
  App.propTypes = {
      init : React.PropTypes.func,
      children : React.PropTypes.element,
  };
  export default App;
  </code></pre>
  
  <h1>Jest Snapshot Test</h1>
  
  <pre><code>import React from 'react';
  import App from 'app/main/components/App';
  import renderer from 'react-test-renderer';
  
  jest.mock('react-dom');
  const blank = jest.fn();
  describe('App', () =&gt; {
      it('Renders App', () =&gt; {
          const component = renderer.create(&lt;App init={blank}&gt; &lt;/App&gt;);
          const tree = component.toJSON();
          expect(tree).toMatchSnapshot();
      });
  });
  </code></pre>
  
  <p>When I execute the test I get below error. </p>
  
  <pre><code> console.error node_modules/fbjs/lib/warning.js:36
        Warning: Failed prop type: Invalid prop `children` of type `string` supplied to `App`, expected a single ReactElement.
            in App
  </code></pre>
  
  <p>I can understand that is says Props.children is invalid. How can I mock props.children? Or is there some other way test such components </p>