how to test a function in class xomponent code example
Example 1: enzyme test method
const wrapper = shallow(<Button />);
wrapper.instance().handleClick()
Example 2: test one function in react class
expect(wrapper.instance().checkBoxChecked()).equals(true);