Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Jest (UI Testing Tool Evaluation Criteria)

  1. Speed - Fast
  2. Reliability - High
  3. Relevance - High
  4. Mocking facility - library can be mocked or functions that make HTTP requests. or via libs like `nock` etc
  5. Cost to migrate/rebuild existing tests. based on module: it can be few weeks and months (e.g ui-users) for modules that follow Page patterns (huge components).
  6. no
  7. yes (3 files in parallel, but not test cases)
  8. yes

React Testing Library with jest

is a light-weight solution for testing React components. It provides light utility functions in a way that encourages devs to write tests that closely resemble how web pages are used.

Rather than dealing with instances of rendered React components, tests will work with actual DOM nodes. Finding form elements by their label text (just like a user would), finding links, and buttons from their text (like a user would). It also exposes a recommended way to find elements by a data-testid as an "escape hatch" for elements where the text content and label do not make sense or is not practical.

Bigtest

Pros

  • Used by FOLIO community

...