Practice React Testing Library | Testing Library.
- create-react-app typescript
- eslint (standard version)
- prettier
# install package
yarn install
# start project
yarn start
# start test
yarn test
# lint+fix
yarn lint:fix
- Rendering test
- component: react-testing-library/Render.tsx
- test: react-testing-library/Render.test.tsx
- UserEvent test (use props)
- List component test (use props)
- Use effect test (use axios)
- Reducer test
- Extra reducer test
- Integration test (not use async)
- component: react-testing-library/Redux.tsx
- test: react-testing-library/Redux.test.tsx
- Integration test (use async)
- Integration test (use async + axios)
- Custom hook test
- custom hook: react-testing-library/useCounter.ts
- component: react-testing-library/CustomHooks.tsx
- test: react-testing-library/useCounter.test.ts