title: Jest snapshot undefined
body: <p>i'm new to testing react with jest, and i'm confused as to why the snapshots that are generated keeps saying [undefined]. </p>
  
  <p>I feel like i'm definitely making a mistake somewhere in the test. And I'm not sure what's right or wrong at this point. The codes for code, test, and snapshot is posted below. </p>
  
  <p>If anyone can help and point me in the direction would be greatly appreciated.</p>
  
  <p>Checkbox.js</p>
  
  <pre><code>const styles = {
    checkbox: {
      color: '#ffffff',
      fontWeight: 100,
      fontSize: 14,
    },
  };
  
  const Checkbox = ({ label, checked, onChange, style }) =&gt; (
    &lt;label style={{ ...styles.checkbox, ...style }}&gt;
      &lt;input checked={checked} type="checkbox" onChange={onChange} /&gt;
      {label}
    &lt;/label&gt;
  );
  </code></pre>
  
  <p>Checkbox.test.js</p>
  
  <pre><code>const label = 'Checkbox Test';
  const checked = false;
  const onChange = jest.fn();
  
  describe('Checkbox', () =&gt; {
    it('renders correctly', () =&gt; {
      const cbTest = shallow(
      &lt;Checkbox&gt;
      &lt;label style={{ ...styles.checkbox }}&gt;
      &lt;input checked={checked} type="checkbox" onChange={onChange} /&gt; 
      {label}
      &lt;/label&gt;
      &lt;/Checkbox&gt;);
      expect(cbTest).toMatchSnapshot();
    });
  });
  </code></pre>
  
  <p>snapshot</p>
  
  <pre><code>exports[`Checkbox renders correctly 1`] = `
  &lt;label
    style={
      Object {
        "color": "#ffffff",
        "fontSize": 14,
        "fontWeight": 100,
      }
    }
  &gt;
    &lt;input
      checked={undefined}
      onChange={undefined}
      type="checkbox"
    /&gt;
  
  &lt;/label&gt;
  `;
  </code></pre>