my package.json is below, and I use guide from @Zargold above. Add React to setupTests.js
"dependencies": {
"ajv": "6.12.0",
"autoprefixer": "^9.1.0",
"axios": "^0.21.1",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.5",
"babel-plugin-async-to-promises": "^1.0.5",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"clean-webpack-plugin": "^0.1.16",
"copy-webpack-plugin": "^4.5.2",
"cross-env": "^5.2.0",
"css-loader": "^1.0.0",
"eslint": "^4.2.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-react": "^7.1.0",
"express": "4.17.1",
"extract-loader": "^2.0.1",
"file-loader": "^1.1.11",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"postcss-loader": "^2.1.6",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-notifications": "^1.7.4",
"react-redux": "7.2.0",
"react-router": "5.1.2",
"react-router-dom": "5.1.2",
"react-scripts": "^5.0.1",
"redux": "4.0.5",
"sass": "^1.71.1",
"sass-loader": "^7.1.0",
"style-loader": "^0.21.0",
"webpack": "4.42.1",
"webpack-cli": "3.3.11",
"webpack-dev-middleware": "3.7.2",
"webpack-dev-server": "3.10.3",
"webpack-hot-middleware": "2.25.0",
"webpack-merge": "4.2.2"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^12.1.5",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-react": "^6.24.1",
"babel-register": "^6.26.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"uglifyjs-webpack-plugin": "^1.2.7"
}