I need to write a test case
for example I have a component wrapped under Fragment which is calling another Button
<Fragment>
<CancelButton
onClick={this.cancelCalled}
userName={this.state.userName}
/>
</Fragment>
were cancelCalled is a normal function cancelCalled { //doing something } I need to cover the onclick functionality so how can I do so, help we be really appreciated