/react-unit-testing

Do's and Don'ts when testing react components

Primary LanguageTypeScript

React unit testing

This repo serves as a base to workshops that aim to compare implementation detail testing and behaviour testing.

To navigate it, check the different branches:

  • master is just the base with the components that will be tested
  • enzyme-tests contains tests that rely on implementation details
  • enzyme-tests-broken contains examples of false negatives and positives (check the commits)
  • rtl-tests contains tests written with React Testing Library that prevent false negaives and positives from happening :)