Learned and practice how to preform testing on React components, functions and custom hooks, http calls (API usage) among others.
- *.test.js or *.test.tsx
- *.spec.js or *.spec.tsx Or a folder named _tests_
- Unit tests
- Integration tests
- End to End tests (E2E)
Also carried out the TDD Testing, stands for Test Driven Development Testing, which is writing out the tests to be carried out first before writing code, or functions to passed them.
Testing to ensure your code is of the best standard possible, which can be done through some packages or lanaguage like:
- TypeScript - Ensure the right type of parameters is passed and returned
- Lint - Ensure the right methods are used, or one implemented function accordingly to best practice.
- Pretier - Helps to remove unnecessary spaces and indentation
- Husky - Ensure every developer(s) write code for that particular project or repo are using the standard ways.
- Prettier
- Eslint
- MSW (Mock Service Worker)
- Lint-staged
- Husky
Methods Learnt and Used
- How to test components, functions and custom hooks in React
- How to check your test coverage
- How to use mock services worker for http testing
- How to configure mock services worker
- How to install and configure husky
Got to know jest, react testing libraries are pre-installed with React