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