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