title: jest + enzyme shallow .simulate('change',[args]) not passing args to function
body: <p>I have a component with the following props and method:</p>
  
  <pre><code>class OrderDish extends Component {
      static propTypes = {
          order: React.PropTypes.object.isRequired,
          addCommentToOrder: React.PropTypes.func,
      };
  
      handleCommentChange = (event) =&gt; {
          this.props.addCommentToOrder(event.target.value, this.props.order, false);
      };
  
      render() {
          const { order, canOrder } = this.props;
          return (
              &lt;div className="Order-dish"&gt;
                          &lt;TextField
                              className='Order-dish-comment'
                              ref="comment"
                              id={order.entry.type}
                              value={order.comment ? order.comment : ''}
                              onChange={this.handleCommentChange}
                              fullWidth
                              onKeyDown={this.handleKeyPress}
                              disabled={!canOrder}
                          /&gt;
              &lt;/div&gt;
          )
      }
  
  }
  
  export default OrderDish;
  </code></pre>
  
  <p>Now I want to test that the <code>handleCommentChange</code> function gets called with the right arguments when the <code>onChange</code> event triggers on the <code>TextField</code>.</p>
  
  <p>I have a separate test for the method itself which works as expected:</p>
  
  <pre><code>it('handleCommentChange should call addCommentToOrder passing event.target.value, this.props.order, false', () =&gt; {
      const mockKeyPressFN = jest.fn((input) =&gt; {return input});
      let orderDish = shallow(&lt;OrderDish order={mockOrder} addCommentToOrder={mockKeyPressFN}/&gt;);
  
      orderDish.instance().handleCommentChange({key: 'Enter', target: {value: 'mock'}});
      expect(mockKeyPressFN.mock.calls[0]).toContainEqual("mock", {"entry": {"name": "blah", "tag": "MAIN", "type": "bleh"}, "price": 5.44}, false);
    });
  </code></pre>
  
  <p>Now when I try to do the same with <a href="http://airbnb.io/enzyme/docs/api/ShallowWrapper/simulate.html" rel="nofollow noreferrer">simulate</a> (pass the mock object, see if the function gets called):</p>
  
  <pre><code>it('TextField should call handleCommentChange onChange', ()=&gt; {
      const mockKeyPressFN = jest.fn();
      let orderDish = shallow(&lt;OrderDish order={mockOrder} addCommentToOrder={mockKeyPressFN}/&gt;);
      let textField = orderDish.find('TextField');
      let event = {key: 'Enter', target: {value: 'mock'}};
  
      textField.simulate('change',[event]);
      expect(mockKeyPressFN.mock.calls.length).toBe(1);
    });
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>Cannot read property 'value' of undefined</p>
  </blockquote>
  
  <p>So I guess my <code>event</code> object is not getting passed correctly to the <code>.simulate</code> function?</p>
  
  <p>What am I doing wrong?</p>