enzyme configure adapter
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
//dont forget to install 'enzyme-adapter-react-(your React version)' dependency
//In this case 'enzyme-adapter-react-16'
configure({ adapter: new Adapter() });step by step how to fix enzyme-adapter-react-16 not support for React version 17
step one : npm i npm-install-peers -g
step two copy this :
"peerDependencies": {
"react": "^16.13.1",
"react-dom": "^16.13.1"
}
step three: typing in your terminal npm-install-peers
Also in JavaScript:
- swap scroll right in react native
- package json scripts multiple commands
- You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.
- function takes object name and property name and new value
- join array js
- jquery get data attribute value
- format currency javascript
- setstate react js
- javascript document load
- bodyparser
- javascript thread sleep
- javascript biggest number
- function isValidWalk(walk)
- log javascript
- jquery selector checked
- convert string to datetime javascript
- multidimensional array javascript
- javascript this = that
- how to disable menu bar in browser using javascript
- js run html in blob
- javascript seo url parameters
- javascript random number
- javascript loop through array backwords
- moment check valid date