12 Matching Annotations
  1. Nov 2021
  2. Sep 2021
  3. Jun 2021
  4. Mar 2021
  5. Nov 2019
    1. You want to write maintainable tests for your React components. As a part of this goal, you want your tests to avoid including implementation details of your components and rather focus on making your tests give you the confidence for which they are intended. As part of this, you want your testbase to be maintainable in the long run so refactors of your components (changes to implementation but not functionality) don't break your tests and slow you and your team down.
    2. We try to only expose methods and utilities that encourage you to write tests that closely resemble how your web pages are used.
    3. The more your tests resemble the way your software is used, the more confidence they can give you.
    4. Most of the damaging features have to do with encouraging testing implementation details. Primarily, these are shallow rendering, APIs which allow selecting rendered elements by component constructors, and APIs which allow you to get and interact with component instances (and their state/properties) (most of enzyme's wrapper APIs allow this).