How to unit test a method of react component?

You are almost there. Just change your expect to this:

expect(wrapper.instance().checkBoxChecked()).equals(true);

You can go through this link to know more about testing component methods using enzyme


For those who find the accepted answer as not working, try using .dive() on your shallow wrapper before using .instance():

expect(wrapper.dive().instance().somePrivateMethod()).toEqual(true);

Reference: Testing component methods with enzyme