Skip to content

Learning and practicing the react testing course on youtube following a channel (Codevolution)

Notifications You must be signed in to change notification settings

IbrahimO123/React-testing

Repository files navigation

React Testing

Learned and practice how to preform testing on React components, functions and custom hooks, http calls (API usage) among others.

Identifying a test file by Jest

  • *.test.js or *.test.tsx
  • *.spec.js or *.spec.tsx Or a folder named _tests_

Carried Out the the testing we have

  • 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.

Static Testing Analysis

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.

Technologies and Libaries Used

  • 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

Side Note:

Got to know jest, react testing libraries are pre-installed with React

About

Learning and practicing the react testing course on youtube following a channel (Codevolution)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published