You can learn technique of writing test cases by reading this repository when you use redux
, axios
and react-hooks
in create-react-app
yarn test:w
or npm run test:w
- package.json
jest
property and installed packages
nock(this one for mocking apis), @testing-library/react, jest (default package for CRA)
-
src/setupTests.js
- It needs for mocking your axios
-
App.tsx, redux.ts, App.test.tsx