Testing React component onClick event with multiple actions in it
问题 Can't figure it out how to test onClick function with multiple actions in it. onButtonClick = function(action){ this.props.otherAction(); action(); } ... <Button bsStyle="success" bsSize="small" onClick={onButtonClick.bind(this,someAction}> Something </Button> And the test I currently have is like this. const onButtonClick = function (action) { actions.otherAction(); action(); }; it('Should include a button with multiple actions on onClick event.', function () { const button =