I\'m testing a React component using Jest v16.0.1, react-test-renderer v15.4.0 and react-addons-test-utils v15.4.0.
The component has rendered a button:
I have found a solution. Since you are using react, I assume that the onClick handler function is passed to the button as a part of the props. So you can access it through button's props.
component.root.findByType('button').props.onClick();
Or if you have more than one button, you can do this:
component.root.findByProps({ className: "btn btn-lg btn-primary btn-danger" }).props.onClick();