What are Cypress hooks?

What are Cypress hooks?

Hi Macy ,

Cypress hooks are used to define or set preconditions that you want to execute before a set of tests or before each test.

The available hooks in Cypress are -

  1. before()
  2. beforeEach()
  3. after()
  4. afterEach()