Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The pyramid above describes the three types of tests in the Product Catalog fronted.

Unit Tests

  • Purpose: Function testing or Rendering of a single component

  • Tool: jest + react testing library

  • Mock everything except the unit being tested

Integration

  • Purpose: Verify several units working together

  • Tool: jest + react testing library

  • Mock as little as possible. Only mock:

    • Network requests (API calls)

    • Animation components (so that tests don’t need to wait

E2E

  • Purpose: Verify that the entire system functions correctly

  • Tool: cypress

  • Mock nothing

    • Run against the entire application setup (backend + frontend)

    • Backend can be spinned up using Docker with a test data set

  • No labels