1// global config react and enzyme
2
3import { configure } from 'enzyme'
4import Adapter from 'enzyme-adapter-react-16'
5import { shallow, mount, render } from 'enzyme'
6import renderer from 'react-test-renderer'
7
8configure({ adapter: new Adapter() })
9
10global.shallow = shallow
11global.mount = mount
12global.render = render
13global.renderer = renderer
1step by step how to fix enzyme-adapter-react-16 not support for React version 17
2
3
4step one : npm i npm-install-peers -g
5step two copy this :
6"peerDependencies": {
7 "react": "^16.13.1",
8 "react-dom": "^16.13.1"
9}
10step three: typing in your terminal npm-install-peers