Skip to content

Latest commit

 

History

History
61 lines (51 loc) · 4.02 KB

File metadata and controls

61 lines (51 loc) · 4.02 KB

practice React Testing Library

Practice React Testing Library | Testing Library.

environment

  • create-react-app typescript
  • eslint (standard version)
  • prettier

script

# install package
yarn install

# start project
yarn start

# start test
yarn test

# lint+fix
yarn lint:fix

table of contents

  1. Rendering test
  2. UserEvent test (use props)
  3. List component test (use props)
  4. Use effect test (use axios)
  5. Reducer test
  6. Extra reducer test
  7. Integration test (not use async)
  8. Integration test (use async)
  9. Integration test (use async + axios)
  10. Custom hook test