title: Jest test using react-test-renderer is inserting undefined attribute value into the DOM
body: <p>I briefly tried to find this in the react-test-renderer source code, but wasn't able to locate it.</p>
  
  <p>Recall that in React, component element attributes whose values are <code>undefined</code> are not rendered in the DOM.  I.e., given <code>bat = undefined</code> and <code>&lt;Foo bar={bat} /&gt;</code>, the <code>bar</code> attribute will not appear in the generated HTML.</p>
  
  <p>I'm assuming it's expected behavior, but I'm confused why, when an optional component attribute appears in the JSON tree in a Jest snapshot - unless the snapshot is simply confirming that the property is unspecified (<code>ws-automation-id</code> is an optional component property that does not have a <code>defaultProps</code> entry defined):</p>
  
  <pre><code>exports[`the &lt;TextButton/&gt; component should use the specified class names 1`] = `
  &lt;button
    className="gc-icon test-class1 test-class2"
    onClick={[Function]}
    ws-automation-id={undefined}
  &gt;
    Button Text
  &lt;/button&gt;
  `;
  </code></pre>
  
  <p>Given</p>
  
  <pre><code>test('should use the specified class names', () =&gt; {
    const tree = create(&lt;TextButton buttonText="Button Text" onClick={null} classNames={['test-class1', 'test-class2']} /&gt;).toJSON()
    expect(tree).toMatchSnapshot()
  })
  </code></pre>