reactjs – I want to write test case for the below one


I want to write the unit-test cases for this. I am new to React .Any help would be appreciated.

class AddAndRemoveButtons extends React.Component {
    state =
        {
          showForm: false,
          shouldShowButton: true,
        }

    showForm = () => (
      <div>
        <form id="add-app">
          <div>
            <tr>
              <textarea name="InputTextArea" placeholder="Add" />
              <SaveAndCancelButton />
            </tr>
          </div>
        </form>
      </div>
    )

    render() {
      const show = this.state.shouldShowButton;
      if (show) {
        return (
          <span>
            <td>
              <button
                variant="secondary"
                onClick={() => { this.setState({ showForm: true });
                  this.setState({ shouldShowButton: false });
                }}
              >
                Add 
              </button>
            </td>
            <button
              variant="secondary" onClick={() => { this.setState({ showForm: true });
                this.setState({ shouldShowButton: false });
                }}>Remove</button>
            {this.state.showForm ? this.showForm() : null}
          </span>
        );
      }
      return (
        this.showForm()
      );
    }
}
export default AddAndRemoveButtons;