react testing how to execute a component function code example Example: test one function in react class expect(wrapper.instance().checkBoxChecked()).equals(true);