enzyme unit testing code example
Example 1: enzyme test method
const wrapper = shallow(<Button />);
wrapper.instance().handleClick()
Example 2: enzyme testing
npm i --save-dev enzyme enzyme-adapter-react-16
const wrapper = shallow(<Button />);
wrapper.instance().handleClick()
npm i --save-dev enzyme enzyme-adapter-react-16