https://github.com/qkreltms/writing-test-cases-practice
You can learn technique of writing test cases by reading this repository when you use redux, axios and react-hooks in create-react-app
https://github.com/qkreltms/writing-test-cases-practice
axios create-react-app jest nock react-hooks redux testing
Last synced: about 1 month ago
JSON representation
You can learn technique of writing test cases by reading this repository when you use redux, axios and react-hooks in create-react-app
- Host: GitHub
- URL: https://github.com/qkreltms/writing-test-cases-practice
- Owner: qkreltms
- Created: 2021-01-22T02:05:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-22T12:19:55.000Z (over 4 years ago)
- Last Synced: 2025-02-12T09:39:27.352Z (3 months ago)
- Topics: axios, create-react-app, jest, nock, react-hooks, redux, testing
- Language: TypeScript
- Homepage:
- Size: 367 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
You can learn technique of writing test cases by reading this repository when you use `redux`, `axios` and `react-hooks` in `create-react-app`
## Get started
`yarn test:w` or `npm run test:w`
## Check out these files
1. package.json `jest` property and installed packages
```sh
nock(this one for mocking apis), @testing-library/react, jest (default package for CRA)
```2. `src/setupTests.js`
- It needs for mocking your axios
3. `App.tsx, redux.ts, App.test.tsx`